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

[MERGE] website, *: improve customize dialog + add logo sizing #29624

Closed
wants to merge 11 commits into from

Conversation

qsm-odoo
Copy link
Contributor

@qsm-odoo qsm-odoo commented Dec 18, 2018

  • portal, web, web_editor

See sub-commits for details.

  • Many improvements to the customize dialog 'framework'
    (toggle switches, new widgets, ...)
  • Optimization of RPCs (including ace editor which shares the same code)
  • Move navbar options of the customize menu to the customize dialog
  • Add the possibility to control the header logo size
  • Add the possibility to control the header font size

task-1904244

@qsm-odoo qsm-odoo added RD research & development, internal work Website labels Dec 18, 2018
@qsm-odoo qsm-odoo self-assigned this Dec 18, 2018
@robodoo robodoo added seen 🙂 CI 🤖 Robodoo has seen passing statuses labels Dec 18, 2018
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 19, 2018
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 20, 2018
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 21, 2018
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 24, 2018
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Dec 24, 2018
@qsm-odoo qsm-odoo force-pushed the master-logo-sizing-qsm branch 3 times, most recently from 3e17ea6 to 944c078 Compare December 24, 2018 16:38
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Dec 24, 2018
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Dec 26, 2018
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Feb 8, 2019
robodoo pushed a commit that referenced this pull request Feb 8, 2019
- Make the controller part more readable and more efficient (O(1) ORM
  operations instead of O(n)) and remove deprecated code.

- Add the possibility to have a toggle standalone option. This is
  used as soon as an `<opt/>` is alone in its container (note that now,
  the container can be any tag and will be ignored during rendering).

- If an option has no specified 'string' to attach to it, the name of
  the first view it toggles will be used.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Move the 'Show Logo', 'Show Sign In' and 'Fixed Top Menu' options from
the customize menu to the customize theme dialog using new features
introduced with #29624

The customize menu divider is also only added if there are toggable
options in there (which is not the case anymore for all pages since
this commit).

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Before this commit, color options in the theme customize were treated
as big exception in the system. The whole color panel XML was defined
client-side and used custom design. Now, all colors are defined as
options in the "server-side" template, allowing for more customizations
and better maintenance.

This commit also makes the color saving system generic to allow for more
new options in the future (like customizing the logo height or the font
size, which is the next task).

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Before this commit, the loading was shown during colorpicker choice or
body image choice too, which makes no sense. This commit also make a new
loading visual which is less intrusive and flicker less.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Before this commit, in the theme customize modal, only lists were able
to be visible under the condition of a subset of options being enabled.
Now options can too.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Now that the logo can be resized, the affix menu had to be adapted to
handle tall headers.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
* portal, web

This commit introduces the first of many-to-come non-color website user
values: the logo height. Now, the user can choose it in the customize
dialog.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Next commit will change that file to make it extend a web_editor model
instead of a web_editor controller. This commit only moves the file.

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
* web_editor

This commit's goal is to optimize the delay to make a scss customization
thanks to the website customize dialog. Before this commit, the JS code
took advantage of existing web_editor routes but this was far from
efficient as this was done:

1) PY: Load all scss files used in the page
2) JS: Find the one we want to customize and adapt the scss content
3) PY: Create the scss customization with the new content

(So two RPC (including one very slow) and content building in
javascript)

After this commit, this is done:

1) PY: Load the scss file being customized, adapt its content according
   to the new values and save the customization

(So the whole logic is in python, requiring only one small RPC)

This commit also take the opportunity to review the web_editor ace
editor loading code (the logic is shared with website customizations).

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
Options and option sets can declare a data-depends attribute to specify
which options need to be enabled for them to be displayed. With this
commit, we allow specifying which options need to be *disabled* for the
same purpose (we can now do that by prefixing the options IDs with '!').

PR #29624
task-1904244
robodoo pushed a commit that referenced this pull request Feb 8, 2019
* portal

The user can now choose the font-size of its header menu items through
the customize dialog.

PR #29624
task-1904244
robodoo added a commit that referenced this pull request Feb 8, 2019
* portal, web, web_editor

See sub-commits for details.

- Many improvements to the customize dialog 'framework'
  (toggle switches, new widgets, ...)
- Optimization of RPCs (including ace editor which shares the same code)
- Move navbar options of the customize menu to the customize dialog
- Add the possibility to control the header logo size
- Add the possibility to control the header font size

task-1904244

closes #29624
@robodoo
Copy link
Contributor

robodoo commented Feb 8, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 8, 2019
@qsm-odoo qsm-odoo deleted the master-logo-sizing-qsm branch February 12, 2019 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work Website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants