-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
pat-contentbrowser
implementation
#1377
Conversation
260d642
to
68baecc
Compare
looking at the video, great! |
This can be tested by using the mentioned branches of Updating all the core packages which use One more benefit from removing |
Cool! Sorry I didn't read the ticket description carefully enough. |
@MrTango @thet I tried to figure out the
Maybe someone of you can give me a hint how to setup the testing environment? |
2db6cd7
to
197d73f
Compare
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.
@MrTango @petschki great work so far!
All in all this LGTM so far.
Some remarks though:
- Sorting doesn't seem to work. I see there is some sorting code in
SelectedItems.svelte
but for me adding multiple items and trying to sort just doesn't work.
Some feature requests, which are irrelevant to this PR but anyhow:
-
Multiple selection would be nice. Currently you can only select one by one.
-
I'd love some kind of keyboard navigation would be great. Like Arrow navigation, enter to move in a lower directory and setting the focus in that directory, enter to select a node.
-
Using plone.restapi instead of custom endpoints. IMO this is something we really should go for. Why would we have custom JSON endpoints implemented when we can have everything and more through plone.restapi? But for the first iteration depending on the custom JSON endpoints like pat-relateditems is perfectly OK.
@MrTango @petschki About sorting the selected items: What do you think about using |
@thet Thanks for your review! About sorting: this only gets initialized on loading the first time and doesn't work during "first time" item selection indeed. (https://github.com/plone/mockup/pull/1377/files#diff-4b241e899bfbe65a8c35ffadf58f567fea3d4df013c56306db87d1517e10798dR83) this is a small change and I will fix it asap. I'm not sure if we should use Features:
|
bfcd796
to
b79cc0c
Compare
regarding keyboard navigation, yes definitely, i think i had some key's already implemented like ESC to close the browser, but i had to disabled some stuff, when i did update to Svelte 4. Not sure if is enabled already. That was a plugin. regarding RestApi, here from today's classic UI meeting: |
and also multiselection is already on the list, even if we didn't had it before in relateditems. |
btw the sorting code, we have right now is for sorting the selected items, not for sorting the items in the browser ;) |
I do not think the levels should be sortable. thats too much magic for this package. The problem was, that initially when there are no selectedItems and you added some, they weren't sortable immediately in the field ... I've fixed that here c264843 +1 for using a different pattern for search mode. |
3463af6
to
ecb8161
Compare
1e2491b
to
7f5108d
Compare
…e, @patternslib/pat-content-browser).
…ect with shift, enter, esc
32e736e
to
14512c6
Compare
OK ... I'll merge the current state and release another alpha of that. Next week I'll work on :
and eventually :
|
This is the
pat-relateditems
replacement using a miller column content browser.Feature completeness:
pat-contenbrowser
occurrences on a single pageLinkModal
implementationmaximumSelectionSize
pat-upload
to current levelselectableTypes
Test dependencies:
ContentBrowserWidget
for the newpat-contentbrowser
pattern plone.app.z3cform#197ContentBrowserWidget
plone.app.relationfield#51yarn start:webpack
http://localhost:8000/bundle.min.js
asplone
bundle in registry controlpanelRegarding
search mode
:we decided to not implement this here. The
pat-select2
pattern is better for this usecase.UPDATE: Since this should be a feature complete replacement for
pat-relateditems
, thesearch
mode is available too.Sneak Preview (updated 2024-05-16)
TinyMCE Link/Image
tinymce.link.image.mov
Related items selection and resorting
single.select.resort.mov
Multiselection with shift or ctrl/cmd key
multiselect.shift.cmd.mov
Keyword filtering
keyword.filter.mov
Uploading
upload.mov