@canonical/design-system 0.44.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/apps/component/file_tree.ttl +1 -1
- package/data/apps/component/inline_panel.ttl +17 -0
- package/data/apps/{subcomponent → component}/log.ttl +1 -1
- package/data/apps/component/navigation.ttl +1 -1
- package/data/apps/component/notification.ttl +1 -1
- package/data/apps/component/side_navigation.ttl +50 -6
- package/data/apps/group/notifications.ttl +1 -1
- package/data/apps/layout/application_layout.ttl +1 -1
- package/data/apps/layout/content_layout.ttl +2 -3
- package/data/apps/layout/empty_layout.ttl +1 -1
- package/data/apps/layout/empty_state.ttl +1 -1
- package/data/apps/layout/login_layout.ttl +12 -0
- package/data/apps/layout/side_panel_form_layout.ttl +13 -0
- package/data/apps/pattern/action_bar.ttl +2 -2
- package/data/apps/pattern/code_diff.ttl +1 -1
- package/data/apps/pattern/data_views.ttl +85 -0
- package/data/apps/pattern/datatable.ttl +20 -91
- package/data/apps/pattern/destructive_modal.ttl +1 -1
- package/data/apps/pattern/drawer.ttl +1 -1
- package/data/apps/pattern/notification_center.ttl +2 -2
- package/data/apps/pattern/page_header.ttl +58 -0
- package/data/apps/pattern/side_panel.ttl +258 -10
- package/data/apps/subcomponent/data_table-action_bar.ttl +8 -8
- package/data/apps/subcomponent/data_table-body_cell.ttl +26 -26
- package/data/apps/subcomponent/data_table-group_header_row.ttl +8 -8
- package/data/apps/subcomponent/data_table-header_cell.ttl +13 -13
- package/data/apps/subcomponent/data_table-pagination_bar.ttl +11 -11
- package/data/apps/subcomponent/data_table-persistent_selection.ttl +10 -10
- package/data/apps/subcomponent/data_table-settings_menu.ttl +15 -15
- package/data/apps/subcomponent/data_views-filters.ttl +13 -0
- package/data/apps/subcomponent/data_views-saved_views.ttl +13 -0
- package/data/apps/subcomponent/data_views-sort_panel.ttl +13 -0
- package/data/apps/subcomponent/drawer-content.ttl +1 -1
- package/data/apps/subcomponent/drawer-footer.ttl +1 -1
- package/data/apps/subcomponent/drawer-header.ttl +1 -1
- package/data/apps/subcomponent/side_navigation-content.ttl +13 -0
- package/data/apps/subcomponent/side_navigation-context_switcher.ttl +53 -0
- package/data/apps/subcomponent/side_navigation-item.ttl +80 -0
- package/data/apps/subcomponent/side_navigation-item_group.ttl +13 -0
- package/data/apps/subcomponent/side_panel-content.ttl +2 -2
- package/data/apps/subcomponent/side_panel-footer.ttl +196 -3
- package/data/apps/subcomponent/side_panel-header.ttl +212 -3
- package/data/apps_anbox/component/theme_switcher.ttl +1 -1
- package/data/apps_anbox/pattern/side_menu.ttl +0 -1
- package/data/{tagcategory/lpupstream.ttl → apps_identity.ttl} +2 -2
- package/data/apps_landscape/component/checkbox_group.ttl +24 -24
- package/data/apps_landscape/component/code_editor.ttl +35 -35
- package/data/apps_landscape/component/cron_schedule.ttl +4 -4
- package/data/apps_landscape/component/expandable_radio_group.ttl +47 -47
- package/data/apps_landscape/component/expandable_truncation.ttl +20 -20
- package/data/apps_landscape/component/form_section.ttl +4 -4
- package/data/apps_landscape/component/gpg_key_field.ttl +27 -27
- package/data/apps_landscape/component/grouped_select.ttl +25 -25
- package/data/apps_landscape/component/loading_state.ttl +8 -8
- package/data/apps_landscape/component/managed_file_input.ttl +18 -18
- package/data/apps_landscape/component/multi_select_field.ttl +50 -50
- package/data/apps_landscape/component/password_constraints.ttl +1 -1
- package/data/apps_landscape/component/progress_bar.ttl +20 -20
- package/data/apps_landscape/component/read_only_field.ttl +15 -15
- package/data/apps_landscape/component/search_help_popup.ttl +10 -10
- package/data/apps_landscape/component/search_query_editor.ttl +33 -33
- package/data/apps_landscape/component/tag_multi_select.ttl +9 -9
- package/data/apps_landscape/pattern/content_blocks.ttl +20 -20
- package/data/apps_landscape/pattern/dashboard_page_composition.ttl +37 -37
- package/data/apps_landscape/pattern/delivery_scheduling.ttl +6 -6
- package/data/apps_landscape/pattern/form_field_help.ttl +28 -28
- package/data/apps_landscape/pattern/header_search_controls.ttl +41 -41
- package/data/apps_landscape/pattern/ignorable_notification.ttl +16 -16
- package/data/apps_landscape/pattern/information_grid.ttl +14 -14
- package/data/apps_landscape/pattern/instance_association.ttl +5 -5
- package/data/apps_landscape/pattern/process_flow.ttl +11 -11
- package/data/apps_landscape/pattern/progressively_expandable_table.ttl +32 -32
- package/data/apps_landscape/pattern/recurring_schedule.ttl +3 -3
- package/data/apps_landscape/pattern/responsive_action_group.ttl +12 -12
- package/data/apps_landscape/pattern/responsive_header_actions.ttl +14 -14
- package/data/apps_landscape/pattern/responsive_table_filters.ttl +11 -11
- package/data/apps_landscape/pattern/side_panel_form_actions.ttl +40 -40
- package/data/apps_landscape/pattern/sortable_list.ttl +14 -14
- package/data/apps_landscape/pattern/table_filter.ttl +57 -57
- package/data/apps_landscape/pattern/table_filter_chips.ttl +67 -67
- package/data/apps_landscape/pattern/table_pagination.ttl +63 -63
- package/data/apps_landscape/pattern/typed_confirmation_modal.ttl +22 -22
- package/data/apps_landscape/subcomponent/bold_substring.ttl +4 -4
- package/data/apps_landscape/subcomponent/inline_cell_input.ttl +8 -8
- package/data/apps_landscape/subcomponent/label_with_description.ttl +14 -14
- package/data/apps_landscape/subcomponent/nested_dropdown_item.ttl +8 -8
- package/data/apps_landscape/subcomponent/pluralized_bold_count.ttl +7 -7
- package/data/apps_landscape/subcomponent/select_all_results_prompt.ttl +12 -12
- package/data/apps_launchpad/component/avatar.ttl +2 -2
- package/data/apps_launchpad/component/badge.ttl +2 -2
- package/data/apps_launchpad/component/breadcrumbs.ttl +1 -1
- package/data/apps_launchpad/component/button.ttl +2 -2
- package/data/apps_launchpad/component/checkbox_input.ttl +4 -4
- package/data/apps_launchpad/component/combobox.ttl +2 -2
- package/data/apps_launchpad/component/drawer.ttl +4 -4
- package/data/apps_launchpad/component/modal.ttl +4 -12
- package/data/apps_launchpad/component/radio_input.ttl +5 -5
- package/data/apps_launchpad/component/select_input.ttl +1 -1
- package/data/apps_launchpad/component/switch.ttl +5 -5
- package/data/apps_launchpad/component/text_input.ttl +8 -8
- package/data/apps_launchpad/component/textarea_input.ttl +10 -10
- package/data/apps_launchpad/component/tooltip.ttl +3 -3
- package/data/apps_launchpad/subcomponent/combobox-loading.ttl +2 -2
- package/data/apps_launchpad/subcomponent/combobox-search.ttl +4 -4
- package/data/apps_launchpad/subcomponent/description_list-item.ttl +1 -1
- package/data/apps_launchpad/subcomponent/modal-content.ttl +2 -2
- package/data/apps_lxd/component/back_link.ttl +1 -1
- package/data/apps_lxd/component/code_snippet_with_copy_button.ttl +1 -1
- package/data/apps_lxd/component/doc_link.ttl +2 -2
- package/data/apps_lxd/component/meter.ttl +5 -5
- package/data/apps_lxd/component/output_field.ttl +2 -3
- package/data/apps_lxd/component/rename_header.ttl +15 -15
- package/data/apps_lxd/component/tab_links.ttl +4 -4
- package/data/apps_lxd/subcomponent/copy_to_clipboard.ttl +2 -2
- package/data/apps_lxd/view/network_topology.ttl +3 -4
- package/data/apps_portal/layout/details_view.ttl +0 -1
- package/data/{apps_workplaceengineering → apps_workplace}/component/complex_multi_select.ttl +3 -3
- package/data/{apps_workplaceengineering → apps_workplace}/component/label-highlight.ttl +5 -6
- package/data/apps_workplace/component/org_chart.ttl +12 -0
- package/data/{apps_workplaceengineering → apps_workplace}/component/rule.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/skip_link.ttl +2 -2
- package/data/{apps_workplaceengineering → apps_workplace}/component/theme_switcher.ttl +3 -3
- package/data/{apps_workplaceengineering → apps_workplace}/pattern/callout_numbers_card.ttl +4 -4
- package/data/{apps_workplaceengineering → apps_workplace}/pattern/confirmation_modal.ttl +2 -2
- package/data/apps_workplace/pattern/org_event_card.ttl +12 -0
- package/data/apps_workplace/subcomponent/multi_select_input.ttl +12 -0
- package/data/{apps_workplaceengineering.ttl → apps_workplace.ttl} +2 -2
- package/data/concept/Accessibility.ttl +9 -0
- package/data/concept/Breakpoints.ttl +9 -0
- package/data/concept/Design-tokens-Overview.ttl +10 -0
- package/data/concept/Filtering-patterns.ttl +10 -0
- package/data/concept/Foundations-Baseline.ttl +0 -1
- package/data/concept/Foundations-Color.ttl +10 -0
- package/data/concept/Foundations-Density--the-form-channel.ttl +0 -1
- package/data/concept/Foundations-Grid--Layout.ttl +2 -3
- package/data/concept/Foundations-Spacing/-Element-vs-container-owned.ttl +0 -1
- package/data/concept/Foundations-Spacing.ttl +0 -1
- package/data/concept/Foundations-Surfaces.ttl +1 -2
- package/data/concept/Foundations-Typography.ttl +1 -2
- package/data/concept/How-to-choose-between-question-mark-and-information-icon.ttl +10 -0
- package/data/concept/How-to-differentiate-types-of-UI-blocks-.ttl +3 -4
- package/data/concept/How-to-indicate-required-fields-in-forms.ttl +1 -2
- package/data/concept/How-to-support-modifiers-in-a-component.ttl +0 -1
- package/data/concept/Intentional-friction.ttl +0 -1
- package/data/concept/Overflow.ttl +10 -0
- package/data/concept/Understanding-the-modifier-contract.ttl +0 -1
- package/data/documentation/layout/content_page_layout.ttl +13 -0
- package/data/documentation/layout/documentation_layout.ttl +2 -1
- package/data/documentation/layout/library_layout.ttl +13 -0
- package/data/documentation/layout/search_page_layout.ttl +13 -0
- package/data/documentation/pattern/library_side_navigation.ttl +4 -4
- package/data/global/component/accordion.ttl +5 -184
- package/data/global/component/announcement.ttl +4 -4
- package/data/global/component/avatar.ttl +1 -1
- package/data/global/component/badge.ttl +7 -9
- package/data/global/component/breadcrumbs.ttl +8 -7
- package/data/global/component/button.ttl +7 -25
- package/data/global/component/button_link.ttl +1 -1
- package/data/global/component/card.ttl +3 -12
- package/data/global/component/checkbox_field.ttl +1 -1
- package/data/global/component/chip.ttl +5 -6
- package/data/global/component/choices_field.ttl +11 -3
- package/data/global/component/code_snippet.ttl +1 -2
- package/data/global/component/color_field.ttl +1 -1
- package/data/global/component/combobox_field.ttl +2 -18
- package/data/global/component/contextual_menu.ttl +4 -6
- package/data/global/component/date_field.ttl +1 -1
- package/data/global/component/date_time_field.ttl +1 -1
- package/data/global/component/drag_and_drop_list.ttl +3 -3
- package/data/global/component/dropdown_button.ttl +2 -3
- package/data/global/component/file_upload_field.ttl +509 -60
- package/data/global/component/heading.ttl +4 -4
- package/data/global/component/hidden_field.ttl +1 -1
- package/data/global/component/icon.ttl +3 -3
- package/data/global/component/icon_button.ttl +35 -0
- package/data/global/component/icon_in_container.ttl +7 -2
- package/data/global/component/inline_code.ttl +1 -1
- package/data/{apps → global}/component/key_value_pair.ttl +3 -3
- package/data/global/component/keyboard_key.ttl +1 -1
- package/data/global/{pattern/navigation.ttl → component/link.ttl} +3 -3
- package/data/global/component/links.ttl +12 -0
- package/data/global/component/markdown_editor_field.ttl +13 -0
- package/data/global/component/mode_switcher.ttl +2 -2
- package/data/global/component/notification_toast.ttl +1 -1
- package/data/global/component/number_field.ttl +1 -1
- package/data/global/component/pagination.ttl +2 -2
- package/data/global/component/password_field.ttl +1 -1
- package/data/global/component/phone_field.ttl +1 -1
- package/data/global/component/popover.ttl +1 -1
- package/data/global/component/query_builder.ttl +12 -0
- package/data/global/component/range_field.ttl +1 -81
- package/data/global/component/rating_field.ttl +1 -1
- package/data/global/component/relative_timestamp.ttl +2 -1
- package/data/global/component/rich_choices_field.ttl +1 -1
- package/data/global/component/rich_text_editor.ttl +12 -0
- package/data/global/component/rich_text_field.ttl +1 -1
- package/data/global/component/search_field.ttl +1 -1
- package/data/global/{subcomponent/markdown_input.ttl → component/segmented_control.ttl} +3 -3
- package/data/global/component/segmented_control_field.ttl +1 -1
- package/data/global/component/select_field.ttl +1 -1
- package/data/global/component/switch_field.ttl +1 -1
- package/data/global/component/table.ttl +4 -4
- package/data/global/component/tabs.ttl +1 -1
- package/data/global/component/tag.ttl +2 -2
- package/data/global/component/text_field.ttl +1 -1
- package/data/global/component/textarea_field.ttl +1 -1
- package/data/global/component/tile.ttl +2 -5
- package/data/global/component/time_field.ttl +1 -1
- package/data/global/component/timestamp.ttl +2 -1
- package/data/global/component/tooltip.ttl +78 -120
- package/data/global/component/{data_tooltip.ttl → tooltip_data.ttl} +31 -23
- package/data/global/component/tooltip_wrapper.ttl +71 -15
- package/data/global/group/buttons.ttl +1 -8
- package/data/global/group/cards.ttl +2 -6
- package/data/global/group/code_snippets.ttl +1 -1
- package/data/{apps → global}/group/key_value_pairs.ttl +3 -3
- package/data/global/group/keyboard_keys.ttl +1 -1
- package/data/global/group/tiles.ttl +1 -1
- package/data/global/modifier/constructive.ttl +1 -1
- package/data/global/modifier/elevated.ttl +1 -1
- package/data/global/modifier/information.ttl +1 -1
- package/data/global/modifier_family/_emphasis.ttl +1 -2
- package/data/global/modifier_family/_other.ttl +1 -2
- package/data/global/modifier_family/surface.ttl +1 -1
- package/data/global/pattern/description_list.ttl +1 -1
- package/data/global/pattern/field.ttl +1 -1
- package/data/global/{component/markdown_field.ttl → pattern/filter.ttl} +3 -3
- package/data/global/pattern/form_login.ttl +1 -1
- package/data/global/pattern/modal.ttl +5 -21
- package/data/global/pattern/stepper.ttl +1 -1
- package/data/global/pattern/table_of_contents.ttl +1 -1
- package/data/global/pattern/timeline.ttl +14 -19
- package/data/global/pattern/top_navigation.ttl +13 -0
- package/data/global/subcomponent/accordion-item.ttl +3 -156
- package/data/global/subcomponent/card-content.ttl +1 -1
- package/data/global/subcomponent/card-footer.ttl +1 -1
- package/data/global/subcomponent/card-header.ttl +1 -1
- package/data/global/subcomponent/card-image.ttl +2 -2
- package/data/global/subcomponent/card-thumbnail.ttl +1 -1
- package/data/global/subcomponent/chart_legend.ttl +1 -1
- package/data/global/subcomponent/chart_legend_item.ttl +1 -1
- package/data/global/subcomponent/checkbox_input.ttl +1 -1
- package/data/global/subcomponent/color_input.ttl +1 -1
- package/data/global/subcomponent/combobox_input.ttl +2 -18
- package/data/global/subcomponent/date_input.ttl +1 -1
- package/data/global/subcomponent/date_time_input.ttl +1 -1
- package/data/global/subcomponent/field-description.ttl +1 -1
- package/data/global/subcomponent/field-label.ttl +1 -1
- package/data/global/subcomponent/file_upload_input.ttl +503 -50
- package/data/global/subcomponent/hidden_input.ttl +1 -1
- package/data/global/subcomponent/markdown_editor_input.ttl +13 -0
- package/data/global/subcomponent/modal-content.ttl +1 -1
- package/data/global/subcomponent/modal-footer.ttl +3 -19
- package/data/global/subcomponent/modal-header.ttl +5 -21
- package/data/global/subcomponent/number_input.ttl +1 -1
- package/data/global/subcomponent/password_input.ttl +1 -1
- package/data/global/subcomponent/phone_input.ttl +1 -1
- package/data/global/subcomponent/radio_input.ttl +1 -1
- package/data/global/subcomponent/range_input.ttl +3 -84
- package/data/global/subcomponent/rating_input.ttl +1 -1
- package/data/global/subcomponent/rich_text_input.ttl +1 -1
- package/data/global/subcomponent/search_input.ttl +3 -4
- package/data/global/subcomponent/segmented_control_input.ttl +1 -1
- package/data/global/subcomponent/select_input.ttl +1 -1
- package/data/global/subcomponent/spinner.ttl +2 -2
- package/data/global/subcomponent/switch_input.ttl +1 -1
- package/data/global/{layout/form_layout.ttl → subcomponent/text_editor_input.ttl} +2 -2
- package/data/global/subcomponent/text_input.ttl +1 -1
- package/data/global/subcomponent/textarea_input.ttl +1 -1
- package/data/global/subcomponent/tile-content.ttl +1 -1
- package/data/global/subcomponent/time_input.ttl +1 -1
- package/data/global/subcomponent/timeline-content.ttl +2 -2
- package/data/global/subcomponent/timeline-event.ttl +5 -5
- package/data/global/subcomponent/timeline-expansion_indicator.ttl +1 -1
- package/data/global/subcomponent/timeline-header.ttl +1 -1
- package/data/global/variant/tooltip_dense.ttl +87 -6
- package/data/global_dataviews/component/filter_button.ttl +487 -0
- package/data/global_dataviews/component/query_bar.ttl +1639 -0
- package/data/global_dataviews/component/query_chip.ttl +605 -0
- package/data/global_dataviews/group/query_chips.ttl +565 -0
- package/data/global_dataviews/modifier/exclusion.ttl +8 -0
- package/data/global_dataviews/modifier/inclusion.ttl +8 -0
- package/data/global_dataviews/modifier/match.ttl +8 -0
- package/data/global_dataviews/modifier/presence.ttl +8 -0
- package/data/global_dataviews/modifier/range.ttl +8 -0
- package/data/global_dataviews/modifier_family/condition.ttl +9 -0
- package/data/global_dataviews/subcomponent/query_chip-entry.ttl +186 -0
- package/data/global_dataviews/subcomponent/query_chip-segment.ttl +241 -0
- package/data/global_dataviews/subcomponent/query_input.ttl +1287 -0
- package/data/{tagcategory/documentation-stage.ttl → global_dataviews.ttl} +2 -2
- package/data/sites/component/store_card.ttl +92 -0
- package/data/sites/pattern/hero.ttl +295 -4
- package/data/{stores.ttl → sites_stores.ttl} +2 -2
- package/data/tag/designin-progress.ttl +9 -0
- package/data/tag/devbatch1.ttl +1 -1
- package/data/tag/devbatch2.ttl +1 -1
- package/data/tag/devbatch3.ttl +1 -1
- package/data/tag/{wpetriageupstream-and-deprecate.ttl → devdone.ttl} +3 -2
- package/data/tag/devin-progress.ttl +9 -0
- package/data/tag/{stylesready.ttl → devin-review.ttl} +3 -3
- package/data/tag/devpre-approved.ttl +9 -0
- package/data/tag/{devreactapproved.ttl → devreactdone.ttl} +3 -3
- package/data/tag/devreactpreapproved.ttl +1 -1
- package/data/tag/{wpeinital-implementation.ttl → devsveltepreapproved.ttl} +3 -3
- package/data/tag/divergent.ttl +1 -1
- package/data/tag/docscomplete.ttl +1 -1
- package/data/tag/global-docs-missing.ttl +1 -1
- package/data/tag/has-no-global-entry.ttl +1 -1
- package/data/tag/implementationcomplete.ttl +9 -0
- package/data/tag/lpto-be-upstreamed.ttl +1 -1
- package/data/tag/lptriageblocked-reqs-design.ttl +1 -1
- package/data/tag/lptriageno-upstream.ttl +1 -1
- package/data/tag/lptriagereimplement-and-deprecate.ttl +1 -1
- package/data/tag/lptriagereimplement-and-keep.ttl +1 -1
- package/data/tag/lptriageupstream-and-deprecate.ttl +1 -1
- package/data/tag/{needsdefinition.ttl → needscoredocumentation.ttl} +3 -3
- package/data/tag/needsdesign.ttl +9 -0
- package/data/tag/{needsdocumentation.ttl → needsfulldocumentation.ttl} +3 -3
- package/data/tag/needsimplementation.ttl +9 -0
- package/data/tag/needstriage.ttl +1 -1
- package/data/tag/specialadoption-docs.ttl +1 -1
- package/data/tag/triagedbacklog.ttl +2 -2
- package/data/tag/triagedrejected.ttl +2 -2
- package/data/tag/upstream-candidate.ttl +1 -1
- package/data/tag/upstream-compliant.ttl +1 -1
- package/data/tag/waiting-for-delta-review.ttl +1 -1
- package/data/tag/workplaceinitial-implementation.ttl +9 -0
- package/data/tag/workplacetriageupstream-and-deprecate.ttl +9 -0
- package/data/tagcategory/design--documentation-status.ttl +6 -0
- package/data/tagcategory/implementationnotes.ttl +6 -0
- package/data/tagcategory/implementationstatus.ttl +6 -0
- package/data/tagcategory/implementationworkflow.ttl +6 -0
- package/definitions/ontology.ttl +8 -2
- package/package.json +6 -6
- package/skills/adoption-a1-styles/SKILL.md +48 -7
- package/skills/adoption-a2-components/SKILL.md +125 -5
- package/skills/anatomy-author/SKILL.md +302 -95
- package/skills/anatomy-author/clarification-guidelines.md +150 -0
- package/skills/anatomy-author/completeness-checklist.md +224 -0
- package/skills/implement-component/SKILL.md +2 -2
- package/skills/map-journeys/SKILL.md +395 -0
- package/skills/map-journeys/journey-graph.example.html +298 -0
- package/skills/model-domains/SKILL.md +502 -0
- package/data/apps_workplaceengineering/pattern/event_timeline.ttl +0 -13
- package/data/apps_workplaceengineering/pattern/group_card.ttl +0 -13
- package/data/apps_workplaceengineering/pattern/travel_provider_card.ttl +0 -14
- package/data/apps_workplaceengineering/subcomponent/multi_select_input.ttl +0 -12
- package/data/concept/Question-mark-vs-information-icon.ttl +0 -11
- package/data/global/modifier/editable.ttl +0 -8
- package/data/global/modifier/focused.ttl +0 -8
- package/data/global/modifier/highlighted.ttl +0 -8
- package/data/global/modifier/loading.ttl +0 -8
- package/data/global/modifier/muted.ttl +0 -8
- package/data/global/modifier/wireframe.ttl +0 -8
|
@@ -108,6 +108,96 @@ So, asked what this skill is:
|
|
|
108
108
|
|
|
109
109
|
Then, and only then, the breakdown.
|
|
110
110
|
|
|
111
|
+
## What "migrate" means
|
|
112
|
+
|
|
113
|
+
In a one-shot migration — the person asks for the whole app in one change —
|
|
114
|
+
"migrate" means re-platforming the app onto pragma's structure and conventions, not
|
|
115
|
+
rendering the old app's look with pragma parts. The app keeps its FUNCTIONAL
|
|
116
|
+
behaviour: its pages, routes, data and interactions. Its layout and visual
|
|
117
|
+
decisions are replaced by pragma's.
|
|
118
|
+
|
|
119
|
+
For an application, the structure starts with the shell from
|
|
120
|
+
`@canonical/react-ds-app`: `ApplicationLayout` with `SideNavigation`, and
|
|
121
|
+
`ViewLayout` for each page (the package also exports `ContentLayout` and
|
|
122
|
+
`SidePanel`). Its router peers (`@canonical/router-core`, `@canonical/router-react`)
|
|
123
|
+
are optional, and `SideNavigation` takes a `LinkComponent` prop, so the app's own
|
|
124
|
+
router link plugs in. A custom top navigation bar, a username and logout in the
|
|
125
|
+
top-right corner, or a product name styled as a heading are the old app's
|
|
126
|
+
decisions, not features to keep: the navigation moves into `SideNavigation`, the
|
|
127
|
+
user and logout into its footer, and the product name into its header.
|
|
128
|
+
|
|
129
|
+
If that reading cannot be assumed, ask exactly one scope question before starting:
|
|
130
|
+
|
|
131
|
+
> Same look, or pragma conventions?
|
|
132
|
+
|
|
133
|
+
### Adopting the shell (interim)
|
|
134
|
+
|
|
135
|
+
`ApplicationLayout` takes `navigation` plus its default `children`;
|
|
136
|
+
`ViewLayout` takes `children` and an optional `aside`. Neither has a title or
|
|
137
|
+
action slot, so the page header is composed inside the view.
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import Link from "next/link";
|
|
141
|
+
import { Button } from "@canonical/react-ds-global";
|
|
142
|
+
import {
|
|
143
|
+
ApplicationLayout,
|
|
144
|
+
SideNavigation,
|
|
145
|
+
ViewLayout,
|
|
146
|
+
type LinkComponentProps,
|
|
147
|
+
} from "@canonical/react-ds-app";
|
|
148
|
+
|
|
149
|
+
const NextLink = ({ href, ...props }: LinkComponentProps) =>
|
|
150
|
+
href === undefined ? <span {...props} /> : <Link href={href} {...props} />;
|
|
151
|
+
|
|
152
|
+
<ApplicationLayout
|
|
153
|
+
navigation={
|
|
154
|
+
<SideNavigation
|
|
155
|
+
brand={<a href="/" aria-label="Example Product home"><img src={logo} alt="" /></a>}
|
|
156
|
+
applicationName="Example Product"
|
|
157
|
+
root={{ key: "main", items: [
|
|
158
|
+
{ key: "overview", label: "Overview", items: [
|
|
159
|
+
{ label: "Dashboard", url: "/dashboard", icon: "home" },
|
|
160
|
+
] },
|
|
161
|
+
] }}
|
|
162
|
+
footerRoot={{ key: "account", items: [
|
|
163
|
+
{ label: "Ada Lovelace", icon: "user", url: "/account" },
|
|
164
|
+
{ label: "Log out", icon: "log-out", control: "button", onClick: logout },
|
|
165
|
+
] }}
|
|
166
|
+
LinkComponent={NextLink}
|
|
167
|
+
currentUrl={pathname}
|
|
168
|
+
/>
|
|
169
|
+
}
|
|
170
|
+
>
|
|
171
|
+
<main id="main-content">
|
|
172
|
+
<ViewLayout>
|
|
173
|
+
<header>
|
|
174
|
+
<h1>Dashboard</h1>
|
|
175
|
+
<Button importance="primary">Create project</Button>
|
|
176
|
+
</header>
|
|
177
|
+
</ViewLayout>
|
|
178
|
+
</main>
|
|
179
|
+
</ApplicationLayout>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
`LinkComponent` is `ComponentType<LinkComponentProps>` — `href`, `className`,
|
|
183
|
+
`children` and `aria-current`, so `next/link` needs the adapter above: it
|
|
184
|
+
requires `href`, and the contract carries no ref to forward. Without an `href`
|
|
185
|
+
(for example, on a disabled row), the adapter renders a noninteractive span.
|
|
186
|
+
In the Next.js App Router, compose the navigation and its callbacks inside a
|
|
187
|
+
Client Component. Placement: the
|
|
188
|
+
product mark goes in the navigation header (`brand`), the product name in
|
|
189
|
+
`applicationName`, and the user and logout in its footer (`footerRoot`; logout
|
|
190
|
+
is a `button` row); one `h1` per page goes in the page header inside
|
|
191
|
+
`ViewLayout`, with the actions beside it (`aside` is a detail panel or
|
|
192
|
+
filters, not page actions). The header currently renders `applicationName` as
|
|
193
|
+
an `h1`, which conflicts with the Verify rule (one `h1` per page, in the page
|
|
194
|
+
header; the product name is not a heading): treat that as a finding to
|
|
195
|
+
report, not something to work around with app CSS or by moving the name into
|
|
196
|
+
`brand`. Keep the page title as the `h1`.
|
|
197
|
+
|
|
198
|
+
This note is interim: the shell gets its own skill once the layout blocks
|
|
199
|
+
carry usage text.
|
|
200
|
+
|
|
111
201
|
## Install
|
|
112
202
|
|
|
113
203
|
```bash
|
|
@@ -119,8 +209,8 @@ follow a naming convention — the mapping is convention, not a graph field:
|
|
|
119
209
|
`@canonical/<framework>-ds-global` for the `global` tier, `-ds-app` for the shared
|
|
120
210
|
`apps` tier, and `-ds-app-<app>` for an app-specific tier (so the `apps_lxd` tier
|
|
121
211
|
installs `@canonical/react-ds-app-lxd`). The `<app>` segment is the package's own
|
|
122
|
-
short name, not always the tier suffix (the `
|
|
123
|
-
package is `@canonical/svelte-ds-app-
|
|
212
|
+
short name, not always the tier suffix (the `apps_workplace` tier's
|
|
213
|
+
package is `@canonical/svelte-ds-app-workplace`) — `pragma tier list` shows which tiers
|
|
124
214
|
exist, and the derived package name must resolve before you install it. Tiers
|
|
125
215
|
outside `global`/`apps*` have no package convention today: there the target package
|
|
126
216
|
is a decision to raise, not to derive.
|
|
@@ -255,9 +345,8 @@ Do NOT assume a 1:1 mapping from Vanilla names and `p-*` classes. Boundaries mov
|
|
|
255
345
|
what was one blob may now be a component plus subcomponents (e.g. `Accordion` with
|
|
256
346
|
`Accordion.Item`), and icon semantics changed to `currentColor`. The block's `ds:usage`
|
|
257
347
|
When-to-use / When-not-to-use guidance decides what replaces what — read it with
|
|
258
|
-
`pragma
|
|
259
|
-
|
|
260
|
-
DIFFERENT component than the old name suggests.
|
|
348
|
+
`pragma block lookup <Name or ds: IRI>` (MCP: `block_lookup`) — often the honest swap
|
|
349
|
+
is a DIFFERENT component than the old name suggests.
|
|
261
350
|
|
|
262
351
|
## Accessibility warnings are contract
|
|
263
352
|
|
|
@@ -283,10 +372,41 @@ prop's values are the family's values lowercased with spaces as underscores
|
|
|
283
372
|
the lowercase form. A family listed on the block may have no prop on the component
|
|
284
373
|
yet — check the component's types before writing it.
|
|
285
374
|
|
|
375
|
+
## Inputs come with their form
|
|
376
|
+
|
|
377
|
+
Standalone inputs (`TextInput`, `SelectInput`, …) carry input chrome but no spacing
|
|
378
|
+
of their own: the gaps between fields are owned by `Field`/`Form`, the
|
|
379
|
+
react-hook-form model of `adoption-a3-forms`. The standalone inputs exist for
|
|
380
|
+
controls that live outside a form — a filter bar, a theme picker. Placing them by
|
|
381
|
+
hand to build a form — stacking bare inputs in a modal or a settings panel — is the
|
|
382
|
+
failure mode: the fields render with no gaps, because the spacing lives in the form
|
|
383
|
+
system that a component swap never reaches.
|
|
384
|
+
|
|
385
|
+
So a form is not a type to swap piecemeal. In a one-shot migration forms are in
|
|
386
|
+
scope: run the A3 steps for each form as part of the change, and the `Field`/`Form`
|
|
387
|
+
frame brings the label, description, error wiring and field spacing with it. A
|
|
388
|
+
presentational, non-react-hook-form layout is not shipped yet — report that as a
|
|
389
|
+
finding rather than hand-stacking the inputs.
|
|
390
|
+
|
|
391
|
+
## Testing
|
|
392
|
+
|
|
393
|
+
A component test that imports the published packages needs setup under both runners.
|
|
394
|
+
Vitest externalises `node_modules`, so Node meets the components' CSS imports and fails
|
|
395
|
+
with `TypeError: Unknown file extension ".css"`: inline `@canonical/` in
|
|
396
|
+
`test.server.deps`, and add `module` to `resolve.mainFields` for
|
|
397
|
+
`@canonical/react-ds-app`, which publishes only that field. Jest needs
|
|
398
|
+
`moduleNameMapper` entries for `react-ds-app`, `react-hooks` and `ds-types`, the ESM
|
|
399
|
+
transform and a CSS stub. Under both, jsdom has no dialog API, so a test that opens a
|
|
400
|
+
`Modal` needs a `showModal`/`close` polyfill. Setup for each is in
|
|
401
|
+
[`@canonical/react-ds-global`'s "Testing with Jest"](https://github.com/canonical/pragma-web/blob/main/packages/react/ds-global/README.md#testing-with-jest).
|
|
402
|
+
|
|
286
403
|
## Verify per PR
|
|
287
404
|
|
|
288
405
|
- [ ] Root context and density classes present (track A1) — swapped components size
|
|
289
406
|
from the `--density-*` channel, not from luck.
|
|
407
|
+
- [ ] Heading sizes and weights follow the tier's scale in "Foundations: Typography",
|
|
408
|
+
with no app CSS overriding them; the outline is real: one `h1` per page, in
|
|
409
|
+
the page header, and the product name is not a heading.
|
|
290
410
|
- [ ] Zero dev-console warnings from the swapped components.
|
|
291
411
|
- [ ] Keyboard pass on each swapped instance (focus, activation, escape where relevant).
|
|
292
412
|
- [ ] Visual pass against the component's Storybook stories.
|