-
Notifications
You must be signed in to change notification settings - Fork 272
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
feat(ui5-dynamic-page): introduce new component #7899
Conversation
…dynamic-page-petya
…#7845) * feat(ui5-dynamic-page): ensure visibility of title content that never overflows * feat(ui5-dynamic-page) actions style corrected Co-authored-by: Dobrin Dimchev <[email protected]> * feat(ui5-dynamic-page): sizing of toolbar wrappers corrected * feat(ui5-dynamic-page): apply review feedback --------- Co-authored-by: Dobrin Dimchev <[email protected]>
…dynamic-page-petya
* feat(ui5-dynamic-page): prevent unnecessary content overflow when footer hidden * feat(ui5-dynamic-page): move scroll listener to the new scroll container
* feat(ui5-dynamic-page): fit content that has 100% height * feat(ui5-dynamic-page): correct import * feat(ui5-dynamic-page): add tests
* feat(ui5-dynamic-page): keyboard handling * feat(ui5-dynamic-page): add focus span * fix: add expand and focus on title click --------- Co-authored-by: Dobrin Dimchev <[email protected]>
fix(ui5-dynamic-page): apply theme styles Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
* feat(ui5-dynamic-page): screen reader support * feat(ui5-dynamic-page): add tests
fix(ui5-dynamic-page): story and docs added Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
e38bacd
to
3aeebde
Compare
Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
66a3441
to
c70080e
Compare
Different pinned state visual indicator added based on the theme Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
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.
- Expand / collapse, pin buttons are visible even if header is not used
- Title is missing visual separator (shadow) when header doesn't exist
- If the header is snapped while the user is at the top of the page, it can't be expanded via scroll (deviation with openui5)
- If the user starts to scroll from the position where header is snapped (basically around 0-5 top) and scroll a bit up the whole header appear.
- Hovering expand / collapse button doesn't change
ui5-dynamic-page-title
background color - action button appear over content on mobile
|
||
prepareLayoutActions() { | ||
// all navigation/layout actions should have the NeverOverflow behavior | ||
const navigationActions = this.querySelector<Toolbar>("[ui5-toolbar][slot='navigationActions']"); |
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.
why do we need to use querySelector
here instead of this.navigationActions
. In the documentation of the slot it's not described that we expect ui5-toolbar
so if we do it we can describe the slot as:
@slot({ type: HTMLElement })
navigationActions!: Array<Toolbar>;
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.
If you expect toolbar to be assigned to actions / navigationActions it would be good to rename them to navigationBar/actionsBar
otherwise it will be confused because I would assume that i have to pass ui5-button instead of ui5-toolbar
I was thinking if it’s a good idea to provide parts for the main areas since they have responsive paddings by default |
We had such requirements for the TabContainer in the past - it also implements responsive paddings, but still consumers wanted to clear them for some reason. So I think - it's ok to include them. |
* @public | ||
*/ | ||
@slot({ "default": true, type: HTMLElement }) | ||
content!: HTMLElement[]; |
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.
How we use content, expandedContent and snappedContent, isn't only 2 states expended and snapped and two slots enough
/** | ||
* Defines the content of the Heading of the Dynamic Page. | ||
* | ||
* @public |
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.
How we use heading, expendedHeading, snappedHeading, isn't only 2 states expended and snapped and two slots enough
@@ -0,0 +1,8 @@ | |||
import Basic from "../../../_samples/fiori/DynamicPage/Basic/Basic.md"; | |||
|
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.
add slug in frontmatter format for all dynamic page components
|
||
prepareLayoutActions() { | ||
// all navigation/layout actions should have the NeverOverflow behavior | ||
const navigationActions = this.querySelector<Toolbar>("[ui5-toolbar][slot='navigationActions']"); |
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.
If you expect toolbar to be assigned to actions / navigationActions it would be good to rename them to navigationBar/actionsBar
otherwise it will be confused because I would assume that i have to pass ui5-button instead of ui5-toolbar
* test: test solution * fix(dynamic-page): final review --------- Co-authored-by: Dobrin Dimchev <[email protected]> Co-authored-by: PetyaMarkovaBogdanova <[email protected]>
I found 2 more issues:
<ui5-dynamic-page show-footer>
<ui5-dynamic-page-title slot="titleArea">
<ui5-title slot="heading">...</ui5-title>
<div slot="snappedHeading">...</div>
<p slot="content">...</p>
<p slot="snappedContent">...</p>
<ui5-tag color-scheme="7">...</ui5-tag>
<ui5-toolbar slot="actionsBar">...</ui5-toolbar>
<ui5-toolbar slot="navigationBar">
<ui5-toolbar-button design="Transparent" icon="share"></ui5-toolbar-button>
<ui5-toolbar-button design="Transparent" icon="action-settings"></ui5-toolbar-button>
</ui5-toolbar>
</ui5-dynamic-page-title>
<ui5-dynamic-page-header slot="headerArea">
...
</ui5-dynamic-page-header>
<ui5-list>
...
</ui5-list>
<ui5-bar slot="footerArea" design="FloatingFooter">
...
</ui5-bar>
</ui5-dynamic-page>
<ui5-dynamic-page show-footer>
<ui5-dynamic-page-title slot="titleArea">
<ui5-title slot="heading">...</ui5-title>
<div slot="snappedHeading">...</div>
<p slot="content">...</p>
<p slot="snappedContent">...</p>
<ui5-tag color-scheme="7">...</ui5-tag>
<ui5-toolbar slot="actionsBar">...</ui5-toolbar>
<ui5-toolbar slot="navigationBar">
<ui5-toolbar-button design="Transparent" icon="share"></ui5-toolbar-button>
<ui5-toolbar-button design="Transparent" icon="action-settings"></ui5-toolbar-button>
</ui5-toolbar>
</ui5-dynamic-page-title>
<ui5-list>
...
</ui5-list>
<ui5-bar slot="footerArea" design="FloatingFooter">
...
</ui5-bar>
</ui5-dynamic-page> |
* fix(dynamic-page): more semantic slot names --------- Co-authored-by: PetyaMarkovaBogdanova <[email protected]> Co-authored-by: Dobrin Dimchev <[email protected]>
Thanks for pointing those out @nnaydenov, they are fixed now. |
New
ui5-dynamic-page
component.The component is a composition of the following subcomponents: