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

refactor: rename ValueState values #8864

Merged
merged 8 commits into from
Apr 27, 2024
Merged

refactor: rename ValueState values #8864

merged 8 commits into from
Apr 27, 2024

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented Apr 26, 2024

The base ValueState enum values have been changed from ValueState.Warning, ValueState.Error and ValueState.Success to ValueState.Critical, ValueState.Negative and ValueState.Positive, causing changes in multiple components supporting valueState property (+ properties of similar type as Dialog.state, StandardListItem.highlight and MessageStrip.design).

BREAKING CHANGE: If you previously used ValueState.Warning, ValueState.Error or ValueState.Success, start using ValueState.Critical, ValueState.Negative and ValueState.Positive respectively. All components with valueState property are also affected:

< 2.0 >= 2.0
ui5-checkbox value-state="Error/Warning/Success" ui5-checkbox value-state="Negative/Critical/Positive"
ui5-combobox value-state="Error/Warning/Success" ui5-combobox value-state="Negative/Critical/Positive"
ui5-datepicker value-state="Error/Warning/Success" DatePicker value-state="Negative/Critical/Positive"
ui5-date-time-picker value-state="Error/Warning/Success" ui5-date-time-picker value-state="Negative/Critical/Positive"
ui5-date-range-picker value-state="Error/Warning/Success" ui5-date-range-picker value-state="Negative/Critical/Positive"
ui5-dialog state="Error/Warning/Success" ui5-dialog state=="Negative/Critical/Positive"
ui5-file-uploader value-state="Error/Warning/Success" ui5-file-uploader value-state="Negative/Critical/Positive"
ui5-input value-state="Error/Warning/Success" ui5-input value-state="Negative/Critical/Positive"
ui5-li highlight="Error/Warning/Success" ui5-li highlight="Negative/Critical/Positive"
ui5-li additional-text-state="Error/Warning/Success" ui5-li additional-text-state="Negative/Critical/Positive"
ui5-message-strip design="Warning" ui5-message-strip design="Critical"
ui5-multi-input value-state="Error/Warning/Success" ui5-multi-input value-state="Negative/Critical/Positive"
ui5-multi-combobox value-state="Error/Warning/Success" ui5-multi-combobox value-state="Negative/Critical/Positive"
ui5-progress-indicator value-state="Error/Warning/Success" ui5-progress-indicator value-state="Negative/Critical/Positive"
ui5-radio-button value-state="Error/Warning/Success" ui5-radio-button value-state="Negative/Critical/Positive"
ui5-select value-state="Error/Warning/Success" ui5-select value-state="Negative/Critical/Positive"
ui5-step-input value-state="Error/Warning/Success" ui5-step-input value-state="Negative/Critical/Positive"
ui5-textarea value-state="Error/Warning/Success" ui5-textarea value-state="Negative/Critical/Positive"
ui5-time-picker value-state="Error/Warning/Success" ui5-time-picker value-state="Negative/Critical/Positive"
ui5-tree-item highlight="Error/Warning/Success" ui5-tree-itemhighlight="Negative/Critical/Positive"
ui5-tree-item additional-text-state="Error/Warning/Success" ui5-tree-item additional-text-state=**"Negative/Critical/Positive"

Related to: #8461

Copy link
Contributor

@nnaydenow nnaydenow left a comment

Choose a reason for hiding this comment

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

To things to discuss:

  • some of the css classes related to value states are renamed and others not
  • should we find and replace all value state translations texts for consistency?

packages/main/src/types/HighlightTypes.ts Outdated Show resolved Hide resolved
packages/main/src/TreeItemBase.ts Outdated Show resolved Hide resolved
@ilhan007
Copy link
Member Author

ilhan007 commented Apr 27, 2024

  • the translation texts keys we can change, but the values should remain the same for now, they will be updated later in the specs
  • the classes we can change, I thought it will become huge change and focused on the API changes

@ilhan007 ilhan007 merged commit ef9304d into main Apr 27, 2024
9 checks passed
@ilhan007 ilhan007 deleted the ref-rename-value-states branch April 27, 2024 17:33
@ilhan007 ilhan007 mentioned this pull request Apr 27, 2024
nnaydenow pushed a commit that referenced this pull request Apr 29, 2024
The base ValueState enum values have been changed from ValueState.Warning, ValueState.Error and ValueState.Success to ValueState.Critical, ValueState.Negative and ValueState.Positive, causing changes in multiple components supporting valueState property (+ properties of similar type as Dialog.state, StandardListItem.highlight and MessageStrip.design).

BREAKING CHANGE: If you previously used ValueState.Warning, ValueState.Error or ValueState.Success, start using ValueState.Critical, ValueState.Negative and ValueState.Positive respectively. 
All components with valueState property are also affected. For example:
```html
<ui5-input value-state="Success"></ui5-input>
<ui5-input value-state="Warning"></ui5-input>
<ui5-input value-state="Error"></ui5-input>
```
```html
<ui5-input value-state="Positive"></ui5-input>
<ui5-input value-state="Critical"></ui5-input>
<ui5-input value-state="Negative"></ui5-input>
```

Related to: #8461
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants