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

[18.0][MIG] web_dialog_size: Migration to 18.0 #3042

Merged
merged 36 commits into from
Feb 6, 2025

Conversation

jeromeguerriat-msf
Copy link

@jeromeguerriat-msf jeromeguerriat-msf commented Dec 27, 2024

re-ordered import to avoid "expected multiple syntax before single syntax" error for eslint
removed useless odoo-module in js file
changed the version
removed undefined "stop" parameter in if()

anthony-muschang and others added 30 commits December 27, 2024 12:04
New module that let the user expand a dialog box to the full screen
width.
* [IMP] web_dialog_size: Put dialog size expanded by default

* [REM] web_popup_large: By duplication of the functionality

* [IMP] web_dialog_size: README and contributors

* [ADD] configuration parameter for default behavior

[FIX] return super's promise
[IMP] use fontawesome icons for buttons
* IMP: Added draggable support to dialogs
* FIX: web_dialog_size: export modal
  - PR OCA#733 introduced draggable dialogs which broke some of them
- default_maximize option wasn't working due to strict value comparison
…#954)

This addon had 2 problems after migrating to v11:

1. One call to backend's `ir.config_parameter.get_param` was done for
   each instantiated dialog, while the setting served for the whole
   session equally.
2. That model is now readable only by admin users, so non-admins
   couldn't use the default at all.

Fixed now.
Checking result of rpc call, `dialog_maximize`, will end to be always `true` as the method will return a json: `{'dialog_maximize': false }`. So i changed the test to test the value of json key `dialog_maximize`
Includes some manual fixes to silent ESLint warnings.
It is important to let users decide their default dialog size. Some have ultrawide monitors and this module does more harm than benefit.

Here I add such task to roadmap, to avoid forgetting about it.

@Tecnativa
[IMP] web_dialog_size: Migration to 16.0

[REM] Remove duplicate configuration readme file

[FIX] Make it work for normal dialogs also

[FIX] SelectCreateDialog

precommit
Currently translated at 100.0% (1 of 1 strings)

Translation: web-16.0/web-16.0-web_dialog_size
Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_dialog_size/it/
@pedrobaeza pedrobaeza changed the title 18.0 mig web dialog size [18.0][MIG] web_dialog_size: Migration to 18.0 Dec 30, 2024
@pedrobaeza
Copy link
Member

/ocabot migration web_dialog_size

cc @CarlosRoca13

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 30, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 30, 2024
26 tasks
Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

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

👍 Thanks for your work!

@youring
Copy link

youring commented Jan 9, 2025

FYI, if you install this module with website_sale module, go to product form, Add Media in the Sales tab, upload and select a image for the product, save the product (manually). Open the uploaded image, there exist two expand icon.
web_dialog_size
The odoo form expand icon is introduced by this commit odoo/odoo@31834b3#diff-21d8a9654933e8e45d6bf0f45e66c0320252bbecc91282381f94e00104c9ca1dR45 . Click it will expand the form while closing the dialog.

So do we have to accept the two almost identical buttons in that corner?

@youring
Copy link

youring commented Jan 9, 2025

Personal suggestion, since changing core is hard.
fa-expand > fa-window-maximize
fa-compress > fa-window-restore
max
restore

@bealdav
Copy link
Member

bealdav commented Feb 3, 2025

@chienandalu I see that requested changes are done. Could you approve ?
@youring can your suggestion be done in another PR to avoid a merge delay?

Thanks for all

@youring
Copy link

youring commented Feb 5, 2025

@bealdav Sure. non-blocking since it's only cosmetic.

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.

Good catch @youring !

IMO this is far from a corner case, as it's used in x2ManyX2ManyFieldDialog and FormViewDialog with the limitations described in the commit (an with a different behavior from the one in this module).

It's not just cosmetic as the result is a missleading UI where the user can't know which button does what...

For me the changes should be made (and they're really trivial)

@bealdav
Copy link
Member

bealdav commented Feb 5, 2025

Ok I hope @jeromeguerriat-msf will answer

@jeromeguerriat-msf
Copy link
Author

@bealdav i just pushed the suggestion ;)

@bealdav
Copy link
Member

bealdav commented Feb 6, 2025

@jeromeguerriat-msf thanks a lot cc @chienandalu

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.

Working fine. Thanks!

@CarlosRoca13
Copy link
Contributor

I think it is ready to be merged 😄 Thanks

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-3042-by-CarlosRoca13-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4295724 into OCA:18.0 Feb 6, 2025
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 7e66409. Thanks a lot for contributing to OCA. ❤️

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.