Introducing Pages and Shared Variables in Slate

Introducing Pages and Shared Variables in Slate

Pages offer application builders the ability to split application UI, logic and resources (data, variables, functions, events) into different pages within a single application, providing isolated scope for each page that loads separately, including widgets, functions, queries, and more. Additionally, you now have a more nuanced control of variables, being able to configure them by page scope, “local” and “shared”, with shared variables being accessible from any page, thereby enhancing application design, performance, and user experience.

Speed up app loading time

A common pattern for splitting a Palantir Slate application into multiple views is to use a tabbed container. However, this approach may lead to very large page loads, limit the level of control developers have over loading data, and present widget maintainability and organizational challenges due to having a single list of components and widgets.

Switching from tabbed containers to pages allows larger applications to load information more quickly, as they only load data relevant to each page’s specific scope.

spsv1

Multiple pages can now be built in a single Slate application.

This approach enables the scoping of application logical flows into individual pages with meaningfully named URL routes. Additionally, page names can be used in the URL to navigate to the page directly when sharing a link into a Slate application.

Application logical flows can now be scoped into individual pages with meaningfully named URLs.

Increase application stability

Splitting up the logic of a complex Slate application into pages also simplifies refactoring, resulting in improved maintainability and performance.

Seamless navigation between pages

The new onNavigate event and navigateTo action allow for simple navigation actions between pages within the same application. Navigating to a page will update the URL route to point to the target page.

Navigation to a page will update the URL route to point to target page.

Sharing application state between pages

New Shared variables are accessible from any Slate page, allowing for an application level state sharing across pages.

spsv4

For more on Slate, review the documentation on Slate application Pages.