DEV: makes discourse-styleguide a core plugin (PR #10847)

This plugin is only useful for developpers, however, making it core allows us to centralize any component modification in one commit.

This integration also adds a new site_setting: styleguide_admin_only which allows to enable a styleguide on a live site while restricting visibility to admins only.

By default, styleguide is disabled.

GitHub

Note this commit is also adding specs for site settings, and fixing a lot of linting issues required to be part of our core lint CI.

I suspect this will cause a repeat of https://meta.discourse.org/t/rebuilds-fail-for-anyone-with-discourse-narrative-bot-in-app-yml/63410?u=david

One workaround is to rename the plugin to styleguide rather than discourse-styleguide (then the naming style will match poll and lazy-yt)

I suspect this will cause a repeat of https://meta.discourse.org/t/rebuilds-fail-for-anyone-with-discourse-narrative-bot-in-app-yml/63410?u=david

One workaround is to rename the plugin to styleguide rather than discourse-styleguide (then the naming style will match poll and lazy-yt)

yes I was wondering about this, ok cool, will rename. I actually maybe I will rename it discourse-storybook, what do you think @eviltrout ?

I went with styleguide finally, FWIW, I tried with both this enabled and discourse-styleguide installed, it seems to work, it’s ofc not recommended as they share the same /styleguide endpoint but that doesn’t seems to create any big issue.

Let’s get this ~party started~ merged!

(…after fixing those linting issues :wink:)

(…after fixing those linting issues :wink:)

Should be good now, damn replacing strings changed the length of a line which made it not linting anymore

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/styleguide-auto-installed/166867/2