-
Notifications
You must be signed in to change notification settings - Fork 6
Add comprehensive UI examples to app-crm: FormView, PageSchema, and component composition #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
83379b1
Initial plan
Copilot 8b24e2a
Add comprehensive UI showcase examples with FormView, PageSchema, and…
Copilot 30c12d1
Fix code review feedback - correct field dependency direction and enh…
Copilot faca542
Add comprehensive implementation guide for UI showcase examples
Copilot 8748865
Move UI examples from standalone ui-showcase to app-crm example
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. | ||
|
|
||
| import { Page } from '@objectstack/spec/ui'; | ||
|
|
||
| /** | ||
| * App Launcher Page | ||
| * | ||
| * Demonstrates an application launcher page similar to Salesforce App Launcher. | ||
| * | ||
| * Features: | ||
| * - Grid-based app icon layout | ||
| * - Global search | ||
| * - Quick access to all apps | ||
| */ | ||
| export const AppLauncherPage: Page = { | ||
| name: 'app_launcher_page', | ||
| label: 'App Launcher', | ||
| description: 'Central hub for accessing all applications', | ||
|
|
||
| type: 'app', | ||
|
|
||
| template: 'centered', | ||
|
|
||
| regions: [ | ||
| { | ||
| name: 'header', | ||
| width: 'full', | ||
| components: [ | ||
| { | ||
| type: 'global:search', | ||
| id: 'app_search', | ||
| label: 'Search Apps', | ||
| properties: {}, | ||
| }, | ||
| ], | ||
| }, | ||
|
|
||
| { | ||
| name: 'main', | ||
| width: 'large', | ||
| components: [ | ||
| { | ||
| type: 'page:header', | ||
| id: 'launcher_header', | ||
| label: 'App Launcher Header', | ||
| properties: { | ||
| title: 'App Launcher', | ||
| subtitle: 'Select an app to get started', | ||
| icon: 'th', | ||
| breadcrumb: false, | ||
| }, | ||
| }, | ||
| { | ||
| type: 'app:launcher', | ||
| id: 'app_grid', | ||
| label: 'Application Grid', | ||
| properties: {}, | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
|
|
||
| isDefault: false, | ||
| assignedProfiles: ['sales_user', 'sales_manager', 'service_user', 'system_administrator'], | ||
|
|
||
| aria: { | ||
| label: 'App Launcher Page', | ||
| description: 'Central application launcher for accessing all apps', | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,189 @@ | ||||||||||||||||
| // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. | ||||||||||||||||
|
|
||||||||||||||||
| import { Page } from '@objectstack/spec/ui'; | ||||||||||||||||
|
|
||||||||||||||||
| /** | ||||||||||||||||
| * Sales Home Page | ||||||||||||||||
| * | ||||||||||||||||
| * Demonstrates a home page layout with dashboards and quick access widgets. | ||||||||||||||||
| * Similar to Salesforce Lightning Home Page. | ||||||||||||||||
| * | ||||||||||||||||
| * Features: | ||||||||||||||||
| * - Dashboard-style layout | ||||||||||||||||
| * - Multiple component regions | ||||||||||||||||
| * - Global search and notifications | ||||||||||||||||
| * - Quick action cards | ||||||||||||||||
| */ | ||||||||||||||||
| export const SalesHomePage: Page = { | ||||||||||||||||
| name: 'sales_home_page', | ||||||||||||||||
| label: 'Sales Home', | ||||||||||||||||
| description: 'Sales team home page with key metrics and quick actions', | ||||||||||||||||
|
|
||||||||||||||||
| type: 'home', | ||||||||||||||||
|
|
||||||||||||||||
| template: 'three-column', | ||||||||||||||||
|
|
||||||||||||||||
| variables: [ | ||||||||||||||||
| { | ||||||||||||||||
| name: 'selectedPeriod', | ||||||||||||||||
| type: 'string', | ||||||||||||||||
| defaultValue: 'this_month', | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
|
|
||||||||||||||||
| regions: [ | ||||||||||||||||
| { | ||||||||||||||||
| name: 'header', | ||||||||||||||||
| width: 'full', | ||||||||||||||||
| components: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:header', | ||||||||||||||||
| id: 'home_header', | ||||||||||||||||
| label: 'Sales Home Header', | ||||||||||||||||
| properties: { | ||||||||||||||||
| title: 'Sales Dashboard', | ||||||||||||||||
| subtitle: 'Welcome back, {current_user.first_name}', | ||||||||||||||||
| icon: 'home', | ||||||||||||||||
| breadcrumb: false, | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
|
|
||||||||||||||||
| { | ||||||||||||||||
| name: 'left_sidebar', | ||||||||||||||||
| width: 'small', | ||||||||||||||||
| components: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:card', | ||||||||||||||||
| id: 'quick_create', | ||||||||||||||||
| label: 'Quick Create', | ||||||||||||||||
| properties: { | ||||||||||||||||
| title: 'Quick Create', | ||||||||||||||||
| bordered: true, | ||||||||||||||||
| body: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'nav:menu', | ||||||||||||||||
| id: 'create_menu', | ||||||||||||||||
| properties: {}, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:card', | ||||||||||||||||
| id: 'my_recent_items', | ||||||||||||||||
| label: 'Recent Items', | ||||||||||||||||
| properties: { | ||||||||||||||||
| title: 'Recent Items', | ||||||||||||||||
| bordered: true, | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
|
|
||||||||||||||||
| { | ||||||||||||||||
| name: 'main', | ||||||||||||||||
| width: 'large', | ||||||||||||||||
| components: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:card', | ||||||||||||||||
| id: 'key_metrics', | ||||||||||||||||
| label: 'Key Metrics', | ||||||||||||||||
| properties: { | ||||||||||||||||
| title: 'Key Performance Indicators', | ||||||||||||||||
| bordered: false, | ||||||||||||||||
| body: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'record:highlights', | ||||||||||||||||
| id: 'kpi_highlights', | ||||||||||||||||
| properties: { | ||||||||||||||||
| fields: ['total_revenue', 'deals_won', 'pipeline_value', 'conversion_rate'], | ||||||||||||||||
| layout: 'horizontal', | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:tabs', | ||||||||||||||||
| id: 'home_tabs', | ||||||||||||||||
| label: 'Home Tabs', | ||||||||||||||||
| properties: { | ||||||||||||||||
| type: 'card', | ||||||||||||||||
| position: 'top', | ||||||||||||||||
| items: [ | ||||||||||||||||
| { | ||||||||||||||||
| label: 'My Leads', | ||||||||||||||||
| icon: 'user-plus', | ||||||||||||||||
| children: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:section', | ||||||||||||||||
| properties: {}, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| { | ||||||||||||||||
| label: 'My Opportunities', | ||||||||||||||||
| icon: 'dollar-sign', | ||||||||||||||||
| children: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:section', | ||||||||||||||||
| properties: {}, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| { | ||||||||||||||||
| label: 'My Tasks', | ||||||||||||||||
| icon: 'tasks', | ||||||||||||||||
| children: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:section', | ||||||||||||||||
| properties: {}, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
|
|
||||||||||||||||
| { | ||||||||||||||||
| name: 'right_sidebar', | ||||||||||||||||
| width: 'medium', | ||||||||||||||||
| components: [ | ||||||||||||||||
| { | ||||||||||||||||
| type: 'ai:chat_window', | ||||||||||||||||
| id: 'sales_assistant', | ||||||||||||||||
| label: 'Sales Assistant', | ||||||||||||||||
| properties: { | ||||||||||||||||
| mode: 'sidebar', | ||||||||||||||||
| agentId: 'sales_assistant', | ||||||||||||||||
| context: { | ||||||||||||||||
| page: 'home', | ||||||||||||||||
| user: '{current_user.id}', | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| { | ||||||||||||||||
| type: 'page:card', | ||||||||||||||||
| id: 'upcoming_events', | ||||||||||||||||
| label: 'Calendar', | ||||||||||||||||
| properties: { | ||||||||||||||||
| title: "Today's Schedule", | ||||||||||||||||
| bordered: true, | ||||||||||||||||
| }, | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
| }, | ||||||||||||||||
| ], | ||||||||||||||||
|
|
||||||||||||||||
| isDefault: true, | ||||||||||||||||
| assignedProfiles: ['sales_user', 'sales_manager'], | ||||||||||||||||
|
|
||||||||||||||||
| aria: { | ||||||||||||||||
| label: 'Sales Home Page', | ||||||||||||||||
| description: 'Sales team home page with metrics, leads, and quick actions', | ||||||||||||||||
| }, | ||||||||||||||||
| }; | ||||||||||||||||
|
Comment on lines
+186
to
+189
|
||||||||||||||||
| label: 'Sales Home Page', | |
| description: 'Sales team home page with metrics, leads, and quick actions', | |
| }, | |
| }; | |
| ariaLabel: 'Sales Home Page', | |
| }, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license. | ||
|
|
||
| export { LeadDetailPage } from './lead_detail.page'; | ||
| export { SalesHomePage } from './home.page'; | ||
| export { AppLauncherPage } from './app_launcher.page'; | ||
| export { UtilityBarPage } from './utility_bar.page'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid ARIA properties: The AriaPropsSchema defines properties as
ariaLabel,ariaDescribedBy, androle, but this code useslabelanddescription. ChangelabeltoariaLabeland either removedescriptionor change it toariaDescribedBywith a reference to an element ID.