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

Introduce and support skinName settings parameter #3471

Closed
muxator opened this issue Aug 23, 2018 · 0 comments
Closed

Introduce and support skinName settings parameter #3471

muxator opened this issue Aug 23, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@muxator
Copy link
Contributor

muxator commented Aug 23, 2018

#3441 discusses the introduction of custom named skins.

This issue proposes the first enabling step: the introduction of a new skinName parameter in settings.json that holds the name of the desired skin.

Detailed spec:

  • move current src/static/custom to src/static/skins/no-skin (this will be the default empty skin)
  • in the code, identify the files that point to static/custom/*.
    DONE: they seem to be:
    • src/node/hooks/express/specialpages.js
    • src/static/js/ace.js
    • src/templates/index.html
    • src/templates/javascript.html
    • src/templates/pad.html
  • replace all the references to static/custom/* with src/static/skins/*.
    For HTML files the <%=settings.skinName%> ejs syntax can be used.
  • perform a sanitization of the skin value: when concatenated to settings.exports.root, it has to be a proper, existing subdirectory of src/static/skins
  • in case of errors, fall back to no-skin
  • backwards compatibility: when running with a settings.json from Etherpad <= 1.7, which does not have the skinName parameter, the application has to fall back to no-skin and print a WARNING message in the logs, inviting the user to update its settings file.
@muxator muxator added this to the 1.8 milestone Aug 23, 2018
@muxator muxator self-assigned this Aug 23, 2018
This was referenced Aug 23, 2018
muxator added a commit that referenced this issue Aug 26, 2018
…scripts.

Currently, an Etherpad skin requires the existence of 6 files:
- index.{css,js}
- pad.{css,js}
- timeslider.{css,js}

In the default empty skin (in static/custom), there were 2 small placeholders
({js,css}.template) to be copied in place by the startup script in case no skin
was in use.

Now that we are moving to multiple directories (see #3471) we can simply commit
the example files and remove the copying code from the startup script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant