I currently move the right details view of the Tasks app to the AppSidebar component of nextcloud-vue, see https://github.com/nextcloud/tasks/pull/1030. I noticed a few things with AppSidebar which would limit the functionality of the Tasks app. This issue is to keep track of what needs to be improved on the AppSidebar component to make it usable for Tasks. I will likely add more items to the list, since I am far from done with https://github.com/nextcloud/tasks/pull/1030.

h2 and the input field should be visible after clicking the title. This can be optional, but it is a requirement for the next point. Also, I think it looks weird to permanently show the input field, since the title is then quite small and looks very different to the non-editable title.

AppSidebar. This also means the editable title cannot be shown in an input field permanently.cc @jancborchardt
Thanks for diving into this @raimund-schluessler :)
Also, I think it looks weird to permanently show the input field, since the title is then quite small and looks very different to the non-editable title.
Small point about this by the way: Yes the title should be rendered as a h2 as you say, and in addition it should _also_ be rendered as h2 when in edit mode, just that an input border happens to be around it. No movement of the text from editing to actual display mode would be ideal, as that makes it look rock solid.
@nextcloud/vuejs Would it be ok to use JSX to write render functions? JSX seems to be a lot easier to write and read than plain javascript in that case, see https://vuejs.org/v2/guide/render-function.html#JSX The drawback is that we would need a babel plugin, but since NPM takes care of installing it, it should be ok I guess.
You don't need jsx to write render functions :)
@skjnldsv I know, I wrote these render functions 馃槈
But JSX seems to be a lot shorter and clearer than plain javascript in that case. It's way closer to the template version and might be easier to understand. Compare the javascript version
return createElement(
'anchored-heading', {
props: {
level: 1
}
}, [
createElement('span', 'Hello'),
' world!'
]
)
to the JSX version
return (
<AnchoredHeading level={1}>
<span>Hello</span> world!
</AnchoredHeading>
)
(taken from the vue.js docs: https://vuejs.org/v2/guide/render-function.html#JSX) And it gets even clearer when you have props, callbacks, attributes, etc.
skjnldsv I know, I wrote these render functions 馃槈
Oups 馃檲馃檲
I'm fine with jsx to be honest. It's not like the component is crazy simple already. Maybe we can handle the slot render separately from the AppNavigation so we'll still keep the Vue template for the simple part? I'll let your judge the overall complexity. I'm sure there is a good compromise between all of this! 馃馃槈
Shall we allow to drag the left border of the sidebar to allow adjusting its width (in a range of a min-width and max-width)? We got such a request for the Tasks app https://github.com/nextcloud/tasks/issues/1185. I think it could be nice to give the sidebar content a bit more space if needed.
Closing, as all proposed features are implemented.
Most helpful comment
Closing, as all proposed features are implemented.