Skip to content
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-popup): аdd default responsive paddings #4567

Merged
merged 33 commits into from
Feb 15, 2022

Conversation

LidiyaGeorgieva
Copy link
Contributor

@LidiyaGeorgieva LidiyaGeorgieva commented Jan 12, 2022

Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Affected components: Dialog, Popover, ResponsivePopover, ColorPalettePopover, WizardPopover, BreadcrumbsPopover, DatePickerPopover, ViewSettingsDialog, ComboBox Suggestion popover, Input, File Uploader, MultiComboBox, Select, TabContainer, TimePicker, Tokenizer, BarcodeScanner, Breadcrumbs, ShellBar

Fixes: #4402

Thank you for your contribution! 👏

To get it merged faster, kindly review the checklist below:

Pull Request Checklist

Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Fixes: #4402
Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Fixes: #4402
@ilhan007 ilhan007 changed the title feature(ui5-popup): Add default responsive paddings feat(ui5-popup): Add default responsive paddings Jan 17, 2022
Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Fixes: #4402
Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Fixes: #4402
Default responsive paddings are added for all popups.
In the controls that they are not needed they are removed.
Sample with way to remove the paddings by the user added in the test pages.

Fixes: #4402
Copy link
Member

@MapTo0 MapTo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to expose those parts? I am okay with that just asking if we need to make them public. Did you check IE?

@LidiyaGeorgieva
Copy link
Contributor Author

Do we really need to expose those parts? I am okay with that just asking if we need to make them public. Did you check IE?

We don't need to expose those parts. It's just one way to do it (removing the default responsive paddings).
The other way is to provide class, that can be used by the application.
We should decide which approach is better.

Removing of the paddings in IE does not work if "parts" are used for it.

Default responsive paddings for the content are added for all popups.
In the controls that they are not needed they are removed.
In addition for Dialog's Header and Footer are added responsive paddings.
Sample with way to remove the paddings by the user added in the test pages.

Example with removed TabContainer's content paddings added.

Fixes: #4402
packages/main/src/themes/ResponsivePopoverCommon.css Outdated Show resolved Hide resolved
packages/main/src/themes/Dialog.css Outdated Show resolved Hide resolved
packages/main/src/themes/PopupsCommon.css Outdated Show resolved Hide resolved
packages/main/src/themes/PopupsCommon.css Outdated Show resolved Hide resolved
packages/main/src/themes/PopupsCommon.css Outdated Show resolved Hide resolved
packages/main/src/themes/base/Dialog-parameters.css Outdated Show resolved Hide resolved
packages/main/src/themes/sap_horizon/Dialog-parameters.css Outdated Show resolved Hide resolved
packages/main/src/themes/Dialog.css Outdated Show resolved Hide resolved
Default responsive paddings for the content are added for all popups.
In the controls that they are not needed they are removed.
In addition for Dialog's Header and Footer are added responsive paddings.
Sample with way to remove the paddings by the user added in the test pages.

Example with removed TabContainer's content paddings added.

Fixes: #4402
Default responsive paddings for the content are added for all popups.
In the controls that they are not needed they are removed.
In addition for Dialog's Header and Footer are added responsive paddings.
Sample with way to remove the paddings by the user added in the test pages.

Example with removed TabContainer's content paddings added.

Fixes: #4402
Header styles of Dialog moved to PopupsCommon
@LidiyaGeorgieva LidiyaGeorgieva requested review from a team January 25, 2022 16:22
Copy link
Contributor

@tsanislavgatev tsanislavgatev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ViewSettingsDialog header padding is now too big and it pushes the bar content too much into the middle of the control.
The rest of the controls on our side look fine.

@MapTo0
Copy link
Member

MapTo0 commented Feb 8, 2022

Yes, we investigate and discuss the @MapTo0's proposal.
Before the start of the implementation there was a long discussion about the approach (on mail, with people from different teams).
"Parts" was the chosen one since it is more flexible - there is more use-cases than just remove all default paddings (remove left, right, set fixed paddings, etc.). This flexibility will be useful not only in the web components, but also in the applications.

Having specific left / right padding can be controlled in the specific components, but IMHO having or not paddings in general can be handled in the popups (and every components sets e.g. left padding if needed). However, I am fine with the change so far. Looks good to me.

Small diffs I manage to find testing against master:

  • ComboBox and Input (on mobile) after the change the footer of the Dialog has some paddings. Is this desired behaviour?
  • ShellBar's popover's paddings (when items are truncated on smaller screens are wrong) @nnaydenow check please
  • Wizard's Progress Navigator Steps popover on small screens - paddings are broken after the change

Basically all controls with popups and predefined paddings are still broken and you have to check all components in the library.
Please do more testing and go trough all components.

@LidiyaGeorgieva
Copy link
Contributor Author

ViewSettingsDialog header padding is now too big and it pushes the bar content too much into the middle of the control. The rest of the controls on our side look fine.

ViewSettingsDialog Header on the left has 1 padding and 2 margins in addition of the default responsive paddings. Header on the right side and Footer also have additional paddings. The design should be checked and aligned, but this is valid for other controls also. Probably this will be follow up task on every team.

@LidiyaGeorgieva
Copy link
Contributor Author

Small diffs I manage to find testing against master:

  • ComboBox and Input (on mobile) after the change the footer of the Dialog has some paddings. Is this desired behaviour?
  • ShellBar's popover's paddings (when items are truncated on smaller screens are wrong) @nnaydenow check please
  • Wizard's Progress Navigator Steps popover on small screens - paddings are broken after the change

ComboBox and Input (on mobile) -> Paddings should be responsive for the header, footer and the content. The target is all elements to be vertically aligned.

ShellBar's popover's paddings -> Why wrong? Before there was 7px padding (--_ui5_popup_content_padding, which was not by design), now it is the new one (responsive)

Wizard's Progress Navigator Steps popover -> same as ShellBar

@nnaydenow
Copy link
Contributor

Hi @LidiyaGeorgieva,

Sorry for inconvenience. Could you please recheck BarcodeScanner, Breadcrumbs, ShellBar components.

Regards,
Nayden

@LidiyaGeorgieva
Copy link
Contributor Author

BarcodeScanner

Thank you for noticing that. I checked them. For all three of them is the same:
Before there was 7px padding (--_ui5_popup_content_padding, which was not by design), now they have the new one (responsive)

Copy link
Contributor

@dimovpetar dimovpetar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ColorPalettePopover has extra padding now in the header, when on mobile. Check if its own can be removed, and only use the one from the dialog
  • BarCodeScanner has extra padding in the footer, check if its own can be removed

packages/fiori/src/WizardPopover.hbs Show resolved Hide resolved
packages/main/src/themes/PopupsCommon.css Show resolved Hide resolved
packages/main/src/themes/ResponsivePopoverCommon.css Outdated Show resolved Hide resolved
packages/main/src/themes/ValueStateMessage.css Outdated Show resolved Hide resolved
packages/main/src/themes/ValueStateMessage.css Outdated Show resolved Hide resolved
packages/main/test/specs/Dialog.spec.js Outdated Show resolved Hide resolved
packages/main/test/specs/Dialog.spec.js Show resolved Hide resolved
- some styles and tests adjusted
@LidiyaGeorgieva LidiyaGeorgieva merged commit ddc1e39 into master Feb 15, 2022
@ilhan007 ilhan007 deleted the DialogResponsivePaddings branch February 17, 2022 14:21
ilhan007 pushed a commit that referenced this pull request Mar 18, 2022
* feat(ui5-popup): Add default responsive paddings

Default responsive paddings for the content are added for all popups.
In the controls that they are not needed they are removed.
In addition for Dialog's Header and Footer are added responsive paddings.
Sample with way to remove the paddings by the user added in the test pages.

Example with removed TabContainer's content paddings added.

Fixes: #4402

* "part" atribute added to the Header and Footer of the Dialog

* ViewSettingsDialog unwanted shadow removed
Header styles of Dialog moved to PopupsCommon

* ViewSettingsDialog.css - declaration moved

* ValueStateMessage min height fixed

* in CSS: some selectors changed from tag to attribute

* - SuggestionPopover paddings on mobile fixed with experimental attribute "exportparts"
- Test page for Popups fixed
- ResizeHandlers reworked for Dialog and Popover
- Min height removed for Header and Footer removed as it causes issues

* Resizable Dialog positioning when resize fixed.

* ViewSettingsDialog, Dialog and Suggestion popover styles adjusted

* "no-padding" attribute removed since is not needed anymore

* hash is edited

* ResponsivePopover header fixed

* Typo fixed

* MultiInput's tokenizer's dialog paddings removed from header and footer (for mobile and desktop)

* ColorPalettePopover and BarcodeScanner paddings in header and footer adjusted

* - TokenizerPopover.css file created
- Some styles and tests adjusted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialog: here may be an incorrect padding around the content.
9 participants