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

[Products page] Empty option on unit scale dropdown #12919

Open
filipefurtad0 opened this issue Oct 15, 2024 · 5 comments · May be fixed by #12969
Open

[Products page] Empty option on unit scale dropdown #12919

filipefurtad0 opened this issue Oct 15, 2024 · 5 comments · May be fixed by #12969
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@filipefurtad0
Copy link
Contributor

Description

Follow-up from #12787: it introduced the possibility to select an empty value from unit scale dropdown, on the products page. This seems to be a UI issue only, as it not possible to save these changes - attempting to do so, triggers an error.

Expected Behavior

It should not be possible to select an empty value from the unit scale dropdown, on the products page.

Actual Behaviour

It is possible to select an empty value from the unit scale dropdown, on the products page.

Steps to Reproduce

  1. Log in as a hub or shop.
  2. Create at least one product.
  3. Visit the /products page
  4. Notice it is possible to select an empty option on the unit scale dropdown.
  5. Try to save changes: an error should be displayed and saving should not succeed.

Animated Gif/Screenshot

image

Workaround

Don't select the empty option.

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used: v4.6.8
  • Browser name and version: All
  • Operating System and version (desktop or mobile): All

Possible Fix

@filipefurtad0 filipefurtad0 added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Oct 15, 2024
@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Oct 15, 2024
@chahmedejaz chahmedejaz linked a pull request Nov 9, 2024 that will close this issue
4 tasks
@chahmedejaz chahmedejaz moved this from All the things 💤 to In Progress ⚙ in OFN Delivery board Nov 9, 2024
@chahmedejaz chahmedejaz self-assigned this Nov 9, 2024
@chahmedejaz
Copy link
Collaborator

@filipefurtad0 - I think rather than removing the empty option, we should replace it with the prompt to select the unit scale. How does it sound?
Removing the empty option might result in the unintentional selection of the unit scale by the user.

CC: @RachL

@RachL
Copy link
Contributor

RachL commented Nov 11, 2024

aligned :) 💪

@filipefurtad0
Copy link
Contributor Author

Hey @chahmedejaz ,

Sorry for the delay in my reply.

We've had a quick chat about this today in testers circle and came to the conclusion, that it is relevant to consider two cases:

  • existing variants -> in this case, there should be no empty option, as the variant should already have this previously selected. We're convinced this is a regression introduced by product refactor
  • new variants -> when creating a variant, indeed it is relevant to display a prompt to select the unit scale (as you mention, this could lead to unintentional unit scale attribution)

Hope this helps 👍

@chahmedejaz
Copy link
Collaborator

  • existing variants -> in this case, there should be no empty option, as the variant should already have this previously selected. We're convinced this is a regression introduced by product refactor

Thanks @filipefurtad0 for the feedback.
If the existing variant had an empty option selected previously, then in its place, the prompt will be displayed after the PR. I think that would work?

On the side note, I noticed as of now, we cannot create/update the variant with empty option. I'm not sure if it was the case before or not.

@filipefurtad0
Copy link
Contributor Author

Yes, that's it:

as of now, we cannot create/update the variant with empty option

Indeed, this is a mandatory field already before this issue. It should not be possible to remove an attributed unit scale, or create a variant without unit scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
Status: In Progress ⚙
Development

Successfully merging a pull request may close this issue.

4 participants