Skip to content

refactor: rename ValueState values#8864

Merged
ilhan007 merged 8 commits intomainfrom
ref-rename-value-states
Apr 27, 2024
Merged

refactor: rename ValueState values#8864
ilhan007 merged 8 commits intomainfrom
ref-rename-value-states

Conversation

@ilhan007
Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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?

@ilhan007
Copy link
Copy Markdown
Contributor 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
@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.

2 participants