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-switch): implement sap_horizon theme #4156

Merged
merged 90 commits into from
Nov 3, 2021
Merged

Conversation

Todor-ads
Copy link
Member

feat(ui5-switch): implement sap_horizon theme

@ilhan007 ilhan007 changed the title implement sap_horizon theme feat(ui5-switch): implement sap_horizon theme Oct 25, 2021
{{/if}}

<span class="ui5-switch-handle" part="handle">
<ui5-icon
{{!-- <ui5-icon
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove commented code

@tsanislavgatev
Copy link
Contributor

The icons in the slider are higher.(Not centered in the middle of the line)

@tsanislavgatev
Copy link
Contributor

The focus is lost on fiori_3_dark, fiori_3 and belize.
The one with the line, looks broken in compact on horizon.

@tsanislavgatev
Copy link
Contributor

On fiori_3 compact, the no label switch is now wider. I guess this is an issue. Also on horizon they are bigger than the ones pointed in the specification.
Also compared to ui5, the focus is closer to the switch itself, and the green/red ones, are with quite more pale colors, can we please check this?

{{/if}}

<span class="ui5-switch-handle" part="handle">
<ui5-icon
name="{{sapNextIcon}}"
Copy link
Member

@ilhan007 ilhan007 Oct 28, 2021

Choose a reason for hiding this comment

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

Hi Todor, that icon has been added for the Alpha Figma Design (you can check it with ?sap-ui-theme=sap_horizon_exp). I know that in sap_horizon you have to remove it, but let's keep it for the experimental version sap_horizon_exp, note the _exp at the end.

This is how you can do it:

  • First, bring it back to the template
  • add a CSS class to the ui5-icon,
  • apply styles like .class {display: var(--_ui5_switch_handle_icon)}
  • declare the used variable in base parameters as
    --_ui5_switch_handle_icon: none (this will hide it in all the themes)
  • and overwrite the variable in sap_horizon_exp/Switch-parameters as
    --_ui5_switch_handle_icon: inline-block (this will show it only in sap_horizon_exp)

*You can think for appropriate class and variable names
*In future based on how the design evolves we will either remove this icon, or make it visible by default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Todor-ads and others added 18 commits October 28, 2021 11:36
* fix(ui5-combobox): Autocomplete on Safari

Safari losses input's text highlighting after invalidation of the ComboBox web component.
In order to restore the highlighting we need to duplicate the highligh functionality onAfterRendering

* fix(ui5-combobox): Autocomplete on Safari

Safari losses input's text highlighting after invalidation of the ComboBox web component.
In order to restore the highlighting we need to duplicate the highligh functionality onAfterRendering

* fix(ui5-combobox): Autocomplete on Safari

Safari losses input's text highlighting after invalidation of the ComboBox web component.
In order to restore the highlighting we need to duplicate the highligh functionality onAfterRendering
* Update 01-first-steps.md

* Update 02-importing-components.md

* Update 03-understanding-components-APIs.md

* Update 02-importing-components.md

* Update 04-using-icons.md

* Update 05-using-assets.md

* Update 06-using-features.md

* Update 07-wrapping-up.md

* Update README.md

* Update README.md

* Update 01-configuration.md

* Update 02-RTL-and-compact-mode.md

* Update 02-RTL-and-compact-mode.md

* Update 04-OpenUI5-integration.md

* Update 05-other-framework-level-APIs.md

* Update README.md

* Update 01-theme.md

* Update 02-fonts.md

* Update README.md

* Update 01-theme.md

* Update 03-scoping.md

* Update README.md

* Update 01-React.md

* Update 02-Angular.md

* Update 03-Vue.md

* Update 01-custom-UI5-Web-Components-Packages.md

* Update 01-first-steps.md

* Update 02-importing-components.md

* Update 01-configuration.md

* Update 02-fonts.md

* Update 02-custom-UI5-Web-Components.md

* Update 03-understanding-components-metadata.md

* Update 04-testing-UI5-Web-Components.md

* Update README.md

* Update 01-development-workflow.md

* Update 03-playground-app.md

* Update 01-development-workflow.md

* Update FAQ.md

* Update 01-development-workflow.md

* Update README.md

* Update 04-using-icons.md

* Update 01-development-workflow.md
The usage of suggestion-scroll is unclear and there is no UX pattern where such an event is needed. However, in order to keep the event compatible with frameworks, we've decided on making it protected.

BREAKING CHANGE: The "suggestion-scroll" event has been removed as there is no such UX specified.
* Sliders Fiori Next Implementation

* Add new hover/active/focus styles

* Fix handle hover border

* Fix Fiori 3 Interaction states

* Restore HTML markup

* Add interaction states of the range slider handles

* Range slider interaction states CSS improvements

* Fix startpoint dot of the range slider, fix tooltip background to white
There is new font face, added for Fiori Next and will be used mainly for important texts as Page, Bar headings/titles.
Still, the font is not available on ui5.sap.com, so we are using the nightly OpenUI5 build openui5nightly.hana.ondemand.com
* Sliders Fiori Next Implementation

* Add new hover/active/focus styles

* Fix handle hover border

* Fix Fiori 3 Interaction states

* Restore HTML markup

* Add interaction states of the range slider handles

* Range slider interaction states CSS improvements

* Replace the font icon with svg one

* Fix range slider interactions
Previously the card did not provide a way to label the static content in the component and to be announced by screen readers and adding accessibleNameRef, solves this issue.
NOTE: everything added in accessibleNameRef will be read on focusing the card

Fixes: #3681
There are no more console warnings when deregistering resize handlers

Fixes #4131
packages/main/src/Switch.hbs Outdated Show resolved Hide resolved
packages/main/src/themes/Switch.css Outdated Show resolved Hide resolved
packages/main/src/themes/Switch.css Show resolved Hide resolved
packages/main/src/themes/Switch.css Outdated Show resolved Hide resolved
@@ -0,0 +1,29 @@
@import "../base/Switch-parameters.css";
:root {
--_ui5_switch_track_semantic_success_backgroud_color: #deeea9;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a fan of the hardcoded values, but in UI5 are done with lighten/darken functions which are not available in CSS, we can use these for the moment and then update them when the parameters are ready

@tsanislavgatev tsanislavgatev self-requested a review October 28, 2021 14:26
@tsanislavgatev
Copy link
Contributor

Overall the change looks good to me.

Copy link
Member

@ilhan007 ilhan007 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@ilhan007 ilhan007 merged commit e3f82a8 into master Nov 3, 2021
@ilhan007 ilhan007 deleted the switch_horizon branch November 3, 2021 05:56
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.