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

Create new color picker & color field #5174

Merged
merged 19 commits into from
Jun 15, 2024

Conversation

manuelmeister
Copy link
Member

@manuelmeister manuelmeister commented May 12, 2024

While trying to create a color field on the campCollaboration to be able to differentiate between users with (accidental) same colors, I realized that our colorpickers were not able to handle null values. I thought it would be best to implement the new colorpicker using the EParseField.

Now the the parsefield needs 3 different value types:

image

  • SerializedValue: this is the type(s) that can be provided as v-model
  • InternalValue: this can be any type of your liking, e.g. an object
  • StringValue: this is the string (value) that is displayed in the textfield

@manuelmeister manuelmeister added the deploy! Creates a feature branch deployment for this PR label May 12, 2024
Copy link

github-actions bot commented May 12, 2024

Feature branch deployment currently inactive.

If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.

Copy link
Member

@carlobeltrame carlobeltrame left a comment

Choose a reason for hiding this comment

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

Please replace the existing usages of the old color picker with the new one, I would prefer not to have two different versions at the same time.

The validation message on invalid format in the old picker was "Das Format von entity.null.fields.color ist ungültig", while the new picker outputs "Could not parse #asdfas as a color. Missing a plugin?"

Using only the keyboard, I cannot open the dialog in the new colorfield. The swatch button isn't focusable for me.

The old api-colorpicker apparently happily saves #asdfas as category color, and the category color input isn't displayed anymore from then on. Could we make sure to fix this in the new picker?

@manuelmeister
Copy link
Member Author

@carlobeltrame sorry this is not yet fully reviewable. Of course my goal is to replace the other colorpicker and have it completed to parity with the current one. I'll notify you when I'm ready.

The old api-colorpicker apparently happily saves #asdfas as category color, and the category color input isn't displayed anymore from then on. Could we make sure to fix this in the new picker?

yes should be fixed

@manuelmeister
Copy link
Member Author

@carlobeltrame I figured, I'd rather have a separate color field that has no popup, just a text field and add a separate component with the picker. As soon as I fixed the tests, I'll replace the old color picker with the new one.

@manuelmeister manuelmeister changed the title DRAFT: Create new color picker Create new color picker Jun 2, 2024
@manuelmeister manuelmeister changed the title Create new color picker Create new color picker & color field Jun 2, 2024
@manuelmeister manuelmeister marked this pull request as ready for review June 2, 2024 10:36
frontend/src/locales/de.json Outdated Show resolved Hide resolved
manuelmeister and others added 3 commits June 2, 2024 13:42
Co-authored-by: Bacluc <lucius.bachmann@gmx.ch>
# Conflicts:
#	frontend/src/components/form/base/ColorPicker/ColorSwatch.vue
#	frontend/src/components/form/base/EColorPicker.vue
Copy link
Member

@pmattmann pmattmann left a comment

Choose a reason for hiding this comment

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

One question only.

Copy link
Member

@usu usu left a comment

Choose a reason for hiding this comment

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

Didn't look through all the code, yet. But purely from user testing seems to work as intended 😃

@manuelmeister manuelmeister force-pushed the fix/null-colorpicker branch 2 times, most recently from 430cbf5 to 2dc78f2 Compare June 4, 2024 05:31
@manuelmeister
Copy link
Member Author

@usu can you have a look at it again?
@carlobeltrame it is ready now to be reviewed 😉

@manuelmeister manuelmeister added this pull request to the merge queue Jun 15, 2024
Merged via the queue into ecamp:devel with commit ea9e0a8 Jun 15, 2024
32 checks passed
@manuelmeister manuelmeister deleted the fix/null-colorpicker branch June 15, 2024 16:27
@BacLuc BacLuc mentioned this pull request Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy! Creates a feature branch deployment for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants