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

[17.0][MIG] web_widget_numeric_step: Migration to 17.0 #2825

Open
wants to merge 52 commits into
base: 17.0
Choose a base branch
from

Conversation

achulii
Copy link

@achulii achulii commented May 16, 2024

No description provided.

quentinDupont and others added 30 commits May 16, 2024 13:11
Previous this commit the widget only works with 'dots', with
this commit works using odoo parse method that support other separators.
Previous this commit, the task for auto-step can enter in a
infinite loop. Now only creates a new task if no other task is running.
Currently translated at 100.0% (3 of 3 strings)

Translation: web-12.0/web-12.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_numeric_step/es/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-13.0/web-13.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_widget_numeric_step/it/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-14.0/web-14.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_widget_numeric_step/de/
oca-ci and others added 22 commits May 16, 2024 13:11
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-16.0/web-16.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-16.0/web-16.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step/es/
Currently translated at 100.0% (3 of 3 strings)

Translation: web-16.0/web-16.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step/it/
Mobile screens benefit most from this module's enhanced usability.

However, since the events used for displaying/hiding the +/- buttons depend on mouse, at the end you'll never see these buttons on mobile screens.

Thus, here's a new approach: smaller screens *always* display the buttons.

Besides, inputmode is now decimal, just like upstream float fields.

@moduon MT-4396
Before this patch, if a field was readonly, the user could still use the +/- buttons to alter its value. Not good!

@moduon MT-4396
… layout jumping otherwise

Before this patch:
- On a tablet, buttons wouldn't display (big screen; can't hover).
- On a PC, fields would make layout jumps while hovering.

@moduon MT-4472
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-16.0/web-16.0-web_widget_numeric_step
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step/
If you're using a tablet and click on the ➕ or ➖ buttons created by this module, the result was that the numeric input related to that button got focused.

On tablets, that means that the on-screen keyboard pops up. This usually triggers a layout recalculation and becomes clunky. Besides, it's useless, because if you wanted to use the keyboard, you'd have clicked on the input by yourself, and not in one of those buttons.

After this change, when using a touch screen, if you click on the +/- buttons, you won't auto-focus on the input. Thus, the keyboard won't show up.

@moduon MT-4472
Before this patch, when navigating inputs hitting <kbd>TAB</kbd>, you were stopped before any numeric step input.

Now, you can navigate as usual and use Odoo without a 🐁.

@moduon MT-4657
Default width is too narrow for these fields in list views, which makes it uncomfortable to use in desktops.

@moduon MT-4472
@achulii achulii mentioned this pull request May 16, 2024
15 tasks
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Thanks @achulii Looks promising, although I couldn't make it work

image

@achulii
Copy link
Author

achulii commented May 16, 2024

Thanks @achulii Looks promising, although I couldn't make it work

image

I have not been able to reproduce such a thing, locally I have everything working. Could you please provide more information? Thanks @chienandalu !

@chienandalu
Copy link
Member

I have not been able to reproduce such a thing, locally I have everything working. Could you please provide more information?

In the runbot for this PR, I set the widget in the product view for the weight field. The client doesn't recognize the widget

@achulii
Copy link
Author

achulii commented May 16, 2024

I have not been able to reproduce such a thing, locally I have everything working. Could you please provide more information?

In the runbot for this PR, I set the widget in the product view for the weight field. The client doesn't recognize the widget

The module has not been installed.

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

The module has not been installed.

Ouch, sorry 😅

Tested and working 👍

Looks like the linter doesn't like static blocks declarations 🤔

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.

None yet