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-step-input): implement sap_horizon theme #4247

Merged
merged 13 commits into from
Nov 5, 2021
Merged

Conversation

Todor-ads
Copy link
Member

@Todor-ads Todor-ads commented Nov 3, 2021

feat(ui5-step-input): implement sap_horizon theme

@Todor-ads Todor-ads removed the request for review from tsanislavgatev November 3, 2021 06:53
@ilhan007
Copy link
Member

ilhan007 commented Nov 4, 2021

Check disabled state

openui5 - has border-bottom, more visible
Screenshot 2021-11-04 at 08 05 07

wc - no border-bottom, almost invisible
Screenshot 2021-11-04 at 08 05 24

-> check if you should add border or not and if the opacity/background color is fine

Readonly (but this is for all themes, not sap_horizon only)

wc - has -/+ icons, no not-editable icon (that has to be present in sap_horizon only)
Screenshot 2021-11-04 at 08 06 57

openui5 - no -/+ icons, has not-editable icon
Screenshot 2021-11-04 at 08 07 10

-> here, at least hide +/- icons when readonly (technically that means not to render the incr/decr divs and remove the padding around the internal ui5-input to make it stretch to the entire width of the ui5-step-input)
-> the not-editable icon will come from the ui5-input, so no action for you

@@ -52,6 +54,7 @@
</ui5-input>

<!-- Increment Icon -->
{{#if hasNotReadOnly}}
Copy link
Member

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

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

Comment on lines 3 to 14
: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;
Copy link
Contributor

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

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

Comment on lines 215 to 236
: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);
}
Copy link
Contributor

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

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

}

:host .ui5-step-icon.ui5-step-inc {
right: 0;
right: var(--_ui5_step-input_button_right);
}

:host .ui5-step-icon *:not([clickable]),
Copy link
Contributor

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.

Copy link
Contributor

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.

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

-webkit-appearance: none;
margin: 0;
-webkit-appearance: none;
margin: 0;
}

:host([disabled]) {
Copy link
Contributor

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

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

@ilhan007
Copy link
Member

ilhan007 commented Nov 4, 2021

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)

@@ -186,6 +186,14 @@ const metadata = {
defaultValue: 0,
},

/**
* Indicates whether the input is focssed
Copy link
Contributor

Choose a reason for hiding this comment

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

Focused

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

Comment on lines 544 to 545
this.focused = true;
this.setAttribute("focused", "");
Copy link
Contributor

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?

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

Comment on lines 193 to 196
focused: {
type: Boolean,
},

Copy link
Contributor

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"

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

: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);
Copy link
Contributor

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

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

height: 2rem;
height: 100%;
background-color: var(--sapField_Background);
background-color: var(--_ui5_step_input_button_background-color);
Copy link
Contributor

Choose a reason for hiding this comment

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

underscore for consistency

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

--_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);
Copy link
Contributor

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

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


:root {
--_ui5_step_input_input_error_background_color: inherit;
--_ui5-step_input_button_state_hover_backgroun_color: var(--sapField_Hover_Background);
Copy link
Contributor

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"

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

Comment on lines 23 to 25
:host(:not([value-state]):not([readonly]):not([disabled])){
box-shadow: none;
}
Copy link
Contributor

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

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

@ilhan007 ilhan007 requested review from niyap and ilhan007 November 5, 2021 10:21
niyap
niyap previously approved these changes Nov 5, 2021
Copy link
Contributor

@niyap niyap left a 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;


Copy link
Contributor

Choose a reason for hiding this comment

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

Remove empty line

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

box-shadow: var(--_ui5-input-value-state-error-hover-box-shadow);
}

:host([value-state=Success]:not([readonly]):not([disabled]):hover),
Copy link
Contributor

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.

Copy link
Contributor

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"

@tsanislavgatev
Copy link
Contributor

I see that we now lost the Error state in HC themes:
image
Can we fix it before merging?

@tsanislavgatev
Copy link
Contributor

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.

@ilhan007 ilhan007 merged commit 4180fe7 into master Nov 5, 2021
@ilhan007 ilhan007 deleted the step_input_horizon branch November 5, 2021 16:43
@ilhan007
Copy link
Member

ilhan007 commented Nov 5, 2021

@Todor-ads
I suggest follow up on these visual issues (create a an issue or whatever you prefer), in Warning and Error states on high contrast themes
openui5:
Screenshot 2021-11-05 at 18 46 44
Screenshot 2021-11-05 at 18 46 55

webc
Screenshot 2021-11-05 at 18 47 05

ndeshev pushed a commit to ndeshev/ui5-webcomponents that referenced this pull request Dec 13, 2021
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.

4 participants