Setting up pages
Set up your codebase to use Pages
Unlike folders (the current organizational unit in the Airplane Library), Pages are configured in your codebase. This means that adding, removing, and reorganizing Pages to build your Airplane Library is as simple as editing your filesystem.
To opt into pages, create a
library/folder at the top level of your Airplane project, next to your
airplane.yamlproject configuration file. Every directory within that
library/folder will become a Page, and upon deployment, your Airplane Library will mimic the directory structure of your codebase.
For most teams, you can get started by simply dropping all of your tasks and views into a
library/folder and then deploying. Once you deploy, your Airplane Library will exactly mirror your filesystem. Note that any folders you've created from the UI will be ignored, and any existing tasks or views that were not in the
library/directory will be shown in a separate page from the main Airplane Library. Switching to Pages can be easily reverted.
Tasks and views can still be defined outside of the
library/folder, but will be hidden from the main UI and will appear under "All tasks" in the sidebar. This allows you to define tasks that may be called from other tasks or views, without cluttering your Airplane Library. By leaving those tasks out of the
library/folder, you can ensure that only a curated set of tasks is shown.
Ensure that you create a
library/folder at the root level of your Airplane project, which is the same place your
airplane.yamllives. The contents of this folder are your "library."
- Every directory within the library becomes a Page in your Airplane Library.
- Every task and view within the library appears on their corresponding Page, or if not in a subdirectory, directly on the homepage.
- Every task and view outside the library is still deployed, and can be referenced by other tasks and views, but will not show up in the main Airplane Library. These show up under "All tasks".
Let's take a look at an illustrative example. Suppose our directory structure is as follows:
Copied1airplane/ ⭐ PROJECT ROOT2┣ library/3┃ ┣ top_level_task.airplane.ts4┃ ┣ support/5┃ ┃ ┗ my_task_airplane.py6┃ ┗ sales/7┃ ┣ nested_page/8┃ ┃ ┗ rest_task.task.yaml9┃ ┣ my_sales_task.airplane.ts10┃ ┣ sales_query.sql11┃ ┣ sales_query.task.yaml12┃ ┗ my_view.airplane.tsx13┣ other_task.airplane.ts14┣ airplane.yaml15┣ package.json16┗ requirements.txt
other_taskis not under
library/, so it will appear under the separate "All tasks" page and will not appear in your Airplane Library.
supportPages will appear on the Airplane homepage since they are directly under
- Within each page, you can see the constituent tasks, views, and subpages.
- Page contents can be viewed as either a list or as cards.
Previewing in studio
Previewing in studio
When you're developing in Studio, you'll be able to see a preview of what your Library will look like in the left sidebar, and you can click on individual Pages to preview them.
If you've tried out Pages and they aren’t the right fit for you, you can deploy your tasks without the
library/folder, and the Airplane Library will revert to how it was previously, folder structure and all. This means you can try out Pages risk-free!
It's easy to organize your Airplane Library through Pages! A simple move operation allows the organization of your codebase to be mirrored in Airplane.