-
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-product-switch): initial implementation #971
Conversation
BREAKING CHANGE: @ui5/webcomponents/dist/Icon.js The src property was renamed to name and accepts icon name (such as "add") instead of icon src (such as "sap-icon://add"). Note: the src property will continue to work until the next release due to the impact of the change, but will produce a warning in the console. @ui5/webcomponents/dist/Card.js The avatar property was removed. Use the avatar slot instead - pass an icon(<ui5-icon) or an image(<img). Before: <ui5-card avatar="sap-icon://add"></ui5-card> After: <ui5-card><ui5-icon name="add" slot="avatar"></ui5-icon></ui5-card> and respectively: <ui5-card avatar="http://url/to/my/image"></ui5-card> becomes: <ui5-card><img src="http://url/to/my/image" slot="avatar"/></ui5-card> @ui5/webcomponents-fiori/dist/ShellBarItem.js The src property was renamed to icon and accepts icon name (such as "add") instead of icon src (such as "sap-icon://add")
It turns out that in IE, the SVG is always getting focused upon TAB. By setting focusable="false", the SVG is no longer focusable.
- compress the size of animated coPilot SVG from more than 18k to 8.1k - unused CSS class `svg-box-content` removed - correctly fallback to non-animated SVG if the feature is not imported (there use to be a bug - throws JS error)
packages/fiori/src/ProductSwitch.js
Outdated
* @class | ||
* <h3 class="comment-api-title">Overview</h3> | ||
* | ||
* The <code>ui5-product-switch</code> is a Fiori specific control that is used in <code>ui5-shellbar</code> |
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.
wrong word here
packages/fiori/src/ProductSwitch.js
Outdated
* The <code>ui5-product-switch</code> is a Fiori specific control that is used in <code>ui5-shellbar</code> | ||
* <br><br> | ||
* <h3>ES6 Module Import</h3> | ||
* <code>import "@ui5/webcomponents-fiori/dist/ProductSwitch";</code> |
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.
better end the import with .js
packages/fiori/src/ProductSwitch.js
Outdated
* | ||
* @constructor | ||
* @author SAP SE | ||
* @alias sap.ui.webcomponents.main.ProductSwitch |
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.
fiori, not main
onEnterDOM() { | ||
this._handleResizeBound = this._handleResize.bind(this); | ||
|
||
ResizeHandler.register(document.body, this._handleResizeBound); |
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 on the body?
packages/fiori/src/ProductSwitch.js
Outdated
constructor() { | ||
super(); | ||
|
||
this.ROW_MIN_WIDTH = { |
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.
This isn't per component, should be on the constructor function
* <br><br> | ||
* Example: | ||
* <br> | ||
* <pre>ui5-product-switch-item icon="sap-icon://palette"</pre> |
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.
sap-icon:// should not be written by users any more, we deprecated it
* | ||
* @constructor | ||
* @author SAP SE | ||
* @alias sap.ui.webcomponents.main.ProductSwitchItem |
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.
fiori, not main.
Overall: please scan all the files for the word "main" to make sure there aren't any other leftovers
@@ -0,0 +1,30 @@ | |||
:host { | |||
font-family: var(--sapUiFontFamily); |
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.
Usually, we write css regarding the html native 'hidden' attribute, so the user can hide our components, using it.
!-- from Button.css --!
:host(:not([hidden])) {
display: inline-block;
}
/** | ||
* @class | ||
* <h3 class="comment-api-title">Overview</h3> | ||
* The <code>ui5-product-switch-item</code> represents the items displayed in the <code>ui5-product-switch</code> web component |
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.
missing a full stop at the end
* @class | ||
* <h3 class="comment-api-title">Overview</h3> | ||
* | ||
* The <code>ui5-product-switch</code> is a Fiori specific web component that is used in <code>ui5-shellbar</code> and allows the user easy switching between products. |
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.
The ui5-product-switch
is an SAP Fiori specific web component that is used in ui5-shellbar
and allows the user to easily switch between products.
FIXES: #857