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

#5200 – the users choice is not saved in the settings but is recalculated in px #5298

Conversation

accmeboot
Copy link
Collaborator

@accmeboot accmeboot commented Aug 15, 2024

How the feature works? / How did you fix the issue?

(Screenshots, videos, or GIFs, if applicable)

Added 5 new properties to settings
Updated settings components to have extra schema and reflect the changes in it

Check list

  • unit-tests written
  • e2e-tests written
  • documentation updated
  • PR name follows the pattern #1234 – issue name
  • branch name doesn't contain '#'
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • task status changed to "Code review"
  • reviewers are notified about the pull request

@accmeboot accmeboot marked this pull request as ready for review August 15, 2024 10:22
…choice-is-not-saved-in-the-settings-but-is-recalculated-in-px
name,
className,
...rest
}) => {
const [measure, setMeasure] = useState('px');
const [measure, setMeasure] = useState(
extraValue || extraSchema?.default || 'px',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use MeasurementUnits enum here instead of string literal?

};

useEffect(() => {
calcValue();
}, [value, measure, calcValue]);
setCust(convertValue(value, 'px', measure));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use MeasurementUnits enum here instead of 'px'?

@@ -71,18 +71,23 @@ class Form extends Component {
onUpdate(instance, valid, errs);
}

field(name, onChange) {
field(name, onChange, extraName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe rename 'extra' to something like 'second input name' or something that will describe it more clear?

@accmeboot accmeboot closed this Aug 15, 2024
@accmeboot accmeboot deleted the 5200-the-users-choice-is-not-saved-in-the-settings-but-is-recalculated-in-px branch August 15, 2024 13:35
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.

2 participants