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

[IMP/FIX] playground: fix and improve various things #1412

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

sdegueldre
Copy link
Contributor

The playground hasn't been touched for a while and a few things were
broken before this commit:

  • Exporting as a standalone web application was broken because it still
    attempted to load the templates like it was done in owl 1
  • Resizing the editor tabs still tried to use this.trigger

While fixing the export feature, the files needed by the app were
factored out of hardcoded strings and into real files, as this makes it
easier to maintain, since these files get syntax highlighting.

The samples received the same treatment: there is now a samples folder
containing all the samples, it also contains a jsconfig, giving
autocompletion on owl functions while editing the files, and allowing
the owl import to look how it would when using owl as a node_module.
In the browser, this import is translated to the relative path of the
owl module using an import map.

The second commit moves the github page files to a docs folder on the master branch to make deploying the playground easier.

@sdegueldre sdegueldre force-pushed the master-playground-various-imp-fix-sad branch from 6c1b51b to 210dd65 Compare April 24, 2023 13:07
@sdegueldre sdegueldre force-pushed the master-playground-various-imp-fix-sad branch 2 times, most recently from 918c277 to 2af4dd6 Compare April 24, 2023 13:17
tools/playground/app.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ged-odoo ged-odoo left a comment

Choose a reason for hiding this comment

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

love to see the import map.
i just did a few small comments, nothing important

The playground hasn't been touched for a while and a few things were
broken before this commit:
- Exporting as a standalone web application was broken because it still
attempted to load the templates like it was done in owl 1
- Resizing the editor tabs still tried to use `this.trigger`

While fixing the export feature, the files needed by the app were
factored out of hardcoded strings and into real files, as this makes it
easier to maintain, since these files get syntax highlighting.

The samples received the same treatment: there is now a `samples` folder
containing all the samples, it also contains a jsconfig, giving
autocompletion on owl functions while editing the files, and allowing
the owl import to look how it would when using owl as a node_module.
In the browser, this import is translated to the relative path of the
owl module using an import map.
Currently, some of the things on the playground must be changed directly
on the master branch while other things require checking out the
gh-pages branch and making the modifications there. Even when changes
need to be made on the master branch, all changes that are not direcly
in owl itself need to be copied by hand to the gh-pages branch.

This commit moves all files that exist on the gh-pages branch to the
master branch in the docs folder, this change will require configuring
the github page to use the docs folder instead of a separate branch, but
will make maintenance of the github page and playground easier going
forward.
@sdegueldre sdegueldre force-pushed the master-playground-various-imp-fix-sad branch from 2af4dd6 to 2d17d6d Compare April 24, 2023 13:27
@ged-odoo ged-odoo merged commit b8b5190 into master Apr 24, 2023
@ged-odoo ged-odoo deleted the master-playground-various-imp-fix-sad branch April 24, 2023 13:32
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.

2 participants