-
Notifications
You must be signed in to change notification settings - Fork 273
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-step-input): implement sap_horizon theme #4247
Conversation
packages/main/src/StepInput.hbs
Outdated
@@ -52,6 +54,7 @@ | |||
</ui5-input> | |||
|
|||
<!-- Increment Icon --> | |||
{{#if hasNotReadOnly}} |
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.
you can use unless readonly, instead of if hasNotReadOnly
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.
done
:root { | ||
--_ui5_step-input-input_error_background_color: inherit; | ||
--_ui5-step_input_button_state_hover_backgroun_color: var(--sapField_Hover_Background); | ||
--_ui5_step-input_border_style: none; | ||
--_ui5_step-input_border_style_hover: none; | ||
--_ui5_step-input_button_background-color: transparent; | ||
--_ui5_step-input-input_border: none; | ||
--_ui5_step-input-input_margin_top: 0; | ||
--_ui5_step-input_button_display: inline-flex; | ||
--_ui5_step-input_button_left: 0.125rem; | ||
--_ui5_step-input_button_right: 0.0625rem; | ||
--_ui5_step-input-input_border_focused_after: none; |
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.
Make all variables names consistent, using only underscore for example as in the second variable
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.
done
:host([value-state=Success]:not([readonly]):not([disabled]):hover), | ||
:host([value-state=Error]:not([readonly]):not([disabled]):hover), | ||
:host([value-state=Information]:not([readonly]):not([disabled]):hover), | ||
:host([value-state=Warning]:not([readonly]):not([disabled]):hover) { | ||
background-color: var(--_ui5-step_input_button_state_hover_backgroun_color); | ||
} | ||
|
||
:host([value-state=Success]:not([readonly]):not([disabled])) { | ||
background-color: var(--sapField_SuccessBackground); | ||
} | ||
|
||
:host([value-state=Error]:not([readonly]):not([disabled])) { | ||
background-color: var(--sapField_InvalidBackground); | ||
} | ||
|
||
:host([value-state=Information]:not([readonly]):not([disabled])) { | ||
background-color: var(--sapField_InformationBackground); | ||
} | ||
|
||
:host([value-state=Warning]:not([readonly]):not([disabled])) { | ||
background-color: var(--sapField_WarningBackground); | ||
} |
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.
When the component is active/focused, the background color should be the same as on hover. Currently, when the component is focused, it has white background only on hover, if you move away the pointer, the background is the same as in regular state, which is not correct
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.
done
} | ||
|
||
:host .ui5-step-icon.ui5-step-inc { | ||
right: 0; | ||
right: var(--_ui5_step-input_button_right); | ||
} | ||
|
||
:host .ui5-step-icon *:not([clickable]), |
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.
In openUI5 when the increase/decrease button is active, there is a box-shadow and I think that it is the expected behaviour according to the requirement for the other inputs. Check the visualisation in openUI5 and make it the same here, when the button is active.
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 hover over the increase/decrease button, the component box-shadow in not visible. When you hover over the buttons, it should be the same as you hover over the input field.
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.
done
-webkit-appearance: none; | ||
margin: 0; | ||
-webkit-appearance: none; | ||
margin: 0; | ||
} | ||
|
||
:host([disabled]) { |
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.
When the component is disabled, it should have opacity added over the regular state. Which means that we should have the same background image as in regular state and opacity on top
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.
done
Hello @SAP/ui5-webcomponents-topic-b should the UI5 Web Components core team take over and address the comments to complete the implementation of the StepInput. We would like to complete this at least tomorrow 5 Nov, Fri (although it should have been completed until 3, Wed) |
packages/main/src/StepInput.js
Outdated
@@ -186,6 +186,14 @@ const metadata = { | |||
defaultValue: 0, | |||
}, | |||
|
|||
/** | |||
* Indicates whether the input is focssed |
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.
Focused
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.
Done
packages/main/src/StepInput.js
Outdated
this.focused = true; | ||
this.setAttribute("focused", ""); |
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.
It is strange, on the first line you add focused attribute, on the second one you remove it?
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.
done
packages/main/src/StepInput.js
Outdated
focused: { | ||
type: Boolean, | ||
}, | ||
|
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.
I could not understand why you add "focused" when you already have a property with the same function called "_focused"
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.
done
:host([value-state=Error]:not([readonly]):not([disabled]):hover), | ||
:host([value-state=Information]:not([readonly]):not([disabled]):hover), | ||
:host([value-state=Warning]:not([readonly]):not([disabled]):hover) { | ||
background-color: var(--_ui5_step_input_button_state_hover_backgroun_color); |
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.
Are you sure that the parameter resolves the correct value, since there is a typo
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.
done
height: 2rem; | ||
height: 100%; | ||
background-color: var(--sapField_Background); | ||
background-color: var(--_ui5_step_input_button_background-color); |
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.
underscore for consistency
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.
done
--_ui5-step_input_button_state_hover_backgroun_color: var(--sapField_Background); | ||
--_ui5_step_input_border_style: 1px solid var(--sapField_BorderColor); | ||
--_ui5_step_input_border_style_hover: 1px solid var(--sapField_Hover_BorderColor); | ||
--_ui5_step_input_button_background-color:var(--sapField_Background); |
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.
You have to change it here as well
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.
done
|
||
:root { | ||
--_ui5_step_input_input_error_background_color: inherit; | ||
--_ui5-step_input_button_state_hover_backgroun_color: var(--sapField_Hover_Background); |
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.
Here, the typos are two - dash between the ui5 and step and then "backgroun"
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.
done
:host(:not([value-state]):not([readonly]):not([disabled])){ | ||
box-shadow: none; | ||
} |
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.
Even, with the fix in the input for the background image when disabled, it does not come out of the box below the buttons, you should adjust it
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.
done
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.
With the latest changes, I hope that everything works as expected. I have tested sap horizon, as well as fiori 3 and it looks fine.
I will approve the change, but as I am not part of the team, it will be good if somebody else from the team gives his approval that the change is reviewed from me.
--_ui5_step_input_input_border_top_bottom_focused_after: 0; | ||
--_ui5_step_input_input_border_radius_focused_after: 0.25rem; | ||
|
||
|
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.
Remove empty line
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.
done
box-shadow: var(--_ui5-input-value-state-error-hover-box-shadow); | ||
} | ||
|
||
:host([value-state=Success]:not([readonly]):not([disabled]):hover), |
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.
Can you put the value state values in commas.
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.
Example DatePicker.css
value-state="Success"
If we exclude my last two comments, the change can be merged. And comments might be addressed in following issue. Depending on the priority, we can proceed and create followup issues. |
@Todor-ads |
feat(ui5-step-input): implement sap_horizon theme