R̶e̶a̶c̶t̶.̶j̶s̶ Vue component page support
under review
kerbstomps
A nice feature would be allowing admins a way to create custom renderable React component pages by inserting, uploading, or storing transpiled Babel code or raw JSX into the admin area or a configurable directory on the server.
For example (in the page source):
<YourReactComponent />
<p> some html </p>
<AnotherReactComponent />
When viewed normally, the React Virtual DOM for your components would be rendered on the page.
The page would essentially behave as the return value from the main React render() function.
It would also be nice to allow JSX files for specific pages only, perhaps by having the same naming convention as the name of the page,
For example: "new-page.jsx" or "new-page.min.js" for "new-page.html"
This naming convention could also be applied to other page-specific js/css.
Tobias Knöppler
Nicolas Giard
An alternative would be to add support for generic web components.
This would get rid of any transpiling steps. Such components could still be built with Vue (e.g. to achieve a consisten design language), because you can actually create generic web components with VueJS (see https://vuejs.org/guide/extras/web-components.html#building-custom-elements-with-vue).
The
only
step to make this work in Markdown and Raw HTML pages is to not strip custom html tags when saving. You can already add custom web components by adding a component library as <src> on a per page or per site level.Of course, it would be nice to parse these libraries and offer users a dropdown or something like that for adding custom components, but that's not strictly necessary.
B
Bradley Totaro
I'll +1 Vue Support :)
V
Vinod Kulkarni
Please see comments related to feature I submitted for review, called page-components. Essentially vue components in wiki pages. I have opened a pull request as well.
You can search for 'page-component'.
Justin Anthony
Why not allow for any compiled js/html/css to run? That way you can use any framework to build the app/components and embed them in the wiki for use. Just have to use webpack/babel to chunk the assets.
Justin Anthony
Similar things can be done in software such as Sharepoint, which I know is different but serves a similar purpose to a wiki and I have found a lot of use for custom crafted components/tools/helpers.
Nicolas Giard
under review
Nicolas Giard
The app is built in Vue.js. Bundling React + running them simultaneously would be a total mess.
Vue components on the other hand could be a possibility.
kerbstomps
Nicolas Giard: Ahh I see the problems with that. Seeing as how the underlying architecture is already Vue.js, the above stated using Vue components would be just as effective at creating unique and interactive wiki pages