-
Notifications
You must be signed in to change notification settings - Fork 90
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
Resizable columns #1759
Resizable columns #1759
Conversation
First of all, I'm really looking forward to getting this one merged :)
Seems like you accidentally upgraded the lock file to version 2. There are 2 options for fixing:
|
43596e5
to
009dbd1
Compare
Ha - that was it, thanks man! :) My npm was on version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, works well and the changes make sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for addressing this :)
I added some important comments 🚀
Thanks for the review & feedback John @skjnldsv, I'll get on it tomorrow! :) |
009dbd1
to
1a6784b
Compare
A little later than expected, but today I was able to implement your suggestions @skjnldsv. Cheers! |
Getting close @brueckner ! Thank you so much! It looks great! 🤗 |
1a6784b
to
39f7312
Compare
Alright - the new update changes a few things: SlotsThere's a default slot and a Overriding defaultsI refactored the default settings used by the resizable columns. They can now be overriden by the parent component with 3 simple props:
The inverse defaults for the DocumentationHas been added with two examples and a section about overriding defaults. Thanks a ton @skjnldsv, this is now much nicer to use because of your input! If there's anything else, just let me know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1759 (comment)
Will this also allow to resize the AppSidebar? This would be very neat as well and even more apps would benefit from this. 🙂 |
Nope. Might come later™ ? |
Hey @brueckner! Did you have a bit of time to look at the other comments? :) |
Oh, damn - yes and no. I have seen it, but have been distracted by other things and then forgot about it. I'll reply in the thread of @raimund-schluessler's comment. Thanks for the heads-up! |
2fa1863
to
a3810c4
Compare
I made a little update (see #1759 (comment)) which should not break the docs on netlify anymore. I also made a reabase on master with no conflicts to solve. 👌 |
I'm on it, this has become quite urgent :) |
Done! I fixed some of the vue logic and implemented a very important toggle between list and details for mobile view. <AppContent :show-details="showDetails" @update:showDetails="hideDetails">
<!-- contacts list -->
<template #list>
<ContactsList
:list="contactsList"
:contacts="contacts"
:search-query="searchQuery" />
</template>
<!-- main contacts details -->
<ContactDetails :contact-key="selectedContact" />
</AppContent> Here |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Johannes Brückner <johannes@dotplex.com>
This comment has been minimized.
This comment has been minimized.
b138cc7
to
2c6719a
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2c6719a
to
a611cf6
Compare
@raimund-schluessler tasks seems ok now |
…Mobile Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
55eb159
to
6fb785c
Compare
@skjnldsv Seems to work well for Tasks now (I just checked that it doesn't break the app, I didn't check the functionality of the resizable columns, though). |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Hi! So this is the new counterpart to a Pull Request originally made in nextcloud/mail#4123.
It was suggested to move the implemention into the global component, so that other apps are able to use this as well. Here are some details about the implementation:
This is (still) using the splitpanes package to do the heavy lifting. We've got two columns:
main
andaside
. These two columns havemin
,max
and defaultsize
widths defined here.splitpanes
fires an event calledresized
after a resize has occurred, which triggers a save tolocalStorage
with thesize
values formain
andaside
inonPaneResize()
. The pane sizes are scoped to the parent component, which means that each app implementing this will store their own sizes automatically. To do that, I am pulling the parent component's name (this.$parent.$options.name
) to construct apaneIdentifier
which is then used to store and read from localStorage.So for example, the Mail app implements this insde of the
MailboxThread
component. Thus the record inlocalStorage
will look something like this:As for the DOM structure: the
<slot>
inside<main id="app-content-vue">
has now been wrapped inside<div id="app-content-wrapper">
, which had to be moved up from within the component of the Mail app. This is something that needs to be checked I guess. Does any other app use that#app-content-wrapper
div?Apps that implement this component and just use the default slot should not be affected by this change, other than the new wrapping div. Maybe we could even move the default
<slot>
out of div#app-content-wrapper again... 🤔 That way there wouldn't be any change at all to a component that is not using the named slots. I'd love some feedback on that!Oh and also: can someone please check why there are so many changes/additions to the
package-lock.json
file? Just adding the splitpanes-package shouldn't create that big of a difference I believe. 🤷♂️