-
Notifications
You must be signed in to change notification settings - Fork 11
Migration Guide
All calcite-app-components
will now be shipping as part of calcite-components
. There were a few changes that went into some calcite-app-components when moved, so this guide is meant to help existing users move to the latest calcite-components
version and avoid any conflicts.
- Update your
calcite-components
dependency and/or scripts to versionnext
or>= 1.0.0-beta.42
(when released). - Remove all
calcite-app-components
dependency and/or scripts. - Make any necessary adjustments based on the change section below.
For consistency, styling adjustments were made. Some of these adjustments include:
- alignment
- color
- font sizing
- spacing
Changes were made to allow it to work with calcite-panel
instead of calcite-flow-item
s (see below for an example).
BREAKING CHANGES:
calcite-flow-item
was removed – calcite-panel
should be used as a replacement.
-
This component replaces
calcite-flow-item
(see below for an example). The following methods/props/events/slots were added for this purpose:Methods
beforeBack()
Props
heading
heightScale
intlBack
intlOpen
menuOpen
showBackButton
summary
widthScale
Events
calcitePanelBackClick
Slots
footer-actions
header-actions-start
header-actions-end
header-menu-actions
-
Common usage of
header-content
can now be accomplished using the newly addedheading
andsummary
properties.
BREAKING CHANGES:
-
header-leading-content
slot was renamed toheader-actions-start
-
header-trailing-content
slot was renamed toheader-actions-end
-
detachedScale
was removed in favor ofheightScale
andwidth-scale
– existing usages ofdetachedScale
need to be renamed toheightScale
BREAKING CHANGES:
textFilterPlaceholder
was removed - use filterPlaceholder
instead.
BREAKING CHANGES:
textGroupTitle
was removed - use groupTitle
instead.
BREAKING CHANGES:
-
secondaryAction
was renamed toactionsEnd
. -
textDescription
was removed - usedescription
instead. -
textLabel
was removed - uselabel
instead. -
textRemove
was removed - useintlRemove
instead.
BREAKING CHANGES:
textGroupTitle
was removed - use groupTitle
instead.
BREAKING CHANGES:
textFilterPlaceholder
was removed - use filterPlaceholder
instead.
BREAKING CHANGES:
-
secondaryAction
was renamed toactionsEnd
. -
textDescription
was removed - usedescription
instead. -
textLabel
was removed - uselabel
instead.
FlowItem has been replaced by Panel. Panel now has all the capabilities that FlowItem but the slot names have changed. There are few additional options too. Here is a before and after:
<calcite-flow>
<calcite-flow-item ...>
<!-- content -->
</calcite-flow-item>
<!-- If there is more than one FlowItem, Flow turns on show-back-button in the current FlowItem. -->
<calcite-flow-item heading="Cool heading" summary="Neat summary">
<!-- Renders the Action on start side -->
<calcite-action slot="leading-actions" text="Cool action at start" icon="banana"></calcite-action>
<!-- Renders the Action on the end side. -->
<calcite-action slot="menu-actions" text="Cool action at start" icon="banana"></calcite-action>
<!-- If there is more than one Action, they are hidden in an overflow menu.
<calcite-action slot="menu-actions" text="Additional action 01" icon="banana"></calcite-action>
<calcite-action slot="menu-actions" text="Additional action 02" icon="banana"></calcite-action>
-->
<!-- content -->
<!-- Renders a footer node and places the buttons inside. -->
<calcite-button slot="footer-actions">Done<calcite-button>
<calcite-button slot="footer-actions">Cancel<calcite-button>
</calcite-flow-item>
</calcite-flow>
<flow>
<calcite-panel ...>
<!-- content -->
</calcite-panel>
<!-- If there is more than one Panel, Flow turns on show-back-button in the current Panel. -->
<calcite-panel heading="Cool heading" summary="Neat summary">
<!-- Renders the Action on start side -->
<calcite-action slot="header-actions-start" text="Cool action at start" icon="banana"></calcite-action>
<!-- Renders the Action on the end side. -->
<calcite-action slot="header-actions-end" text="Cool action at start" icon="banana"></calcite-action>
<!-- Additional Actions using this slot are rendered horizontally.
<calcite-action slot="header-actions-end" text="Additional action 01" icon="banana"></calcite-action>
<calcite-action slot="header-actions-end" text="Additional action 02" icon="banana"></calcite-action>
-->
<!-- Renders the overflow button and puts any Action using this slot into the dropdown. -->
<calcite-action slot="header-menu-actions" text="Cool menu action 01" icon="banana"></calcite-action>
<calcite-action slot="header-menu-actions" text="Cool menu action 02" icon="banana"></calcite-action>
<calcite-action slot="header-menu-actions" text="Cool menu action 03" icon="banana"></calcite-action>
<!-- content -->
<!-- Renders a footer node and places the buttons inside. -->
<calcite-button slot="footer-actions">Done<calcite-button>
<calcite-button slot="footer-actions">Cancel<calcite-button>
</calcite-panel>
</flow>