-
-
Notifications
You must be signed in to change notification settings - Fork 99
Clear selection when changing path in structure pattern #1435
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
Conversation
I'm d'accord with your statement, that the persistent selection creates more problems, than it solves. But it was designed for this purpose and if you clear the selection when changeing path, it doesn't make sense to me at all to show this dropdown anymore. Nevertheless, this is a breaking change and has to be discussed. @plone/classicui-team |
The dropdown still might be useful, when selecting across page 1, page 2, ... within the same folder_contents view. While that being said, we at TUD have customized/simplified the dropdown in the moment, when we introduced this change. We introduced three options:
See the screenshots as better illustration: I did not want to pitch too much in this PR, but if more improvements are needed (like shown in the screenshots), I'm willing to add this to my PR as well (with the original styles of course). |
ah, that would be a very nice improvement. Happy to review the PR then. Note: since last week we got rid of |
BTW. the commitlint uses
it would appear correctly in the changelog. |
8627659
to
21e622c
Compare
21e622c
to
d271cc8
Compare
I have added the changes. Some notes:
I created a small screencast too: selection-button-demo.mp4Let me know, what you think. |
Line 230 in a265e4d
you've to add them to plone.app.locales, translation can be done there or, after, using weblate: https://hosted.weblate.org/browse/plone/widgets/en/?q= |
If i remember me correctly, the work on robottest for the selection button was very tricky. We run in some flaky test results. |
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.
Huge +1 from me for this improvement 🎉
I've some minor issues here:
- first time I go to
folder_contents
the button says "0 of 0 selected" ... when I select something, then theof x
fits the amount of items in the folder.

- I'm perfectly fine with the bootstrap icons. Introducing new icons would need an upgrade step in staticresources to register them in the registry ... but that's too much noise I'd say.
- tests needs to be adapter accordingly.
yes we must also check for robottests in CMFPlone if we need to change something. @pgrunewald are you able to run the playwright browsers and test the dependent robottests ? |
Playright tests run generally. Just those tests breaks, where I have changed something. I will work on the remaining tasks (bugs, tests, i18n, docs) starting by tomorrow. |
May I ask about the progress here? I'd really like to have this in Plone 6.2 ... |
Lots of personal topics came up in my life. I will resume working on this soonish. I have nearly all fixes sitting there to be pushed. |
a note to the commitlint error. since |
Just to give an update: I will work on this before and maybe while the upcoming Beethoven Sprint. |
14805a5
to
4ecb501
Compare
I think the PR is ready to be reviewed again. There's also a PR for plone.app.locales collective/plone.app.locales#516 that introduces the new msgids and the German translation. |
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.
This is great! Tested it on folders with 5k+ items and works like a charm.
Though we need some more reviews on this ...
I'd suggest to release this as new feature version mockup==5.4.0
and in plone.staticresources==2.4.0
and include it in buildout.coredev#6.2
constraints/versions (with a mention in README, that its safely backwards compatible to Plone 6.1 too)
thoughts @plone/classicui-team
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.
i have tested it locally. LGTM. Only my checkout of plone.app.locales don't work with the translations, but this can might be my fault on my pip based mxdev install path
That's likely to your browsers localstorage, where the mockup translations are stored. try removing all the |
There are already two approvals for this PR and the other PR for plone.app.locales is merged as well. Is this PR ready to be merged, too? Would be great to have this in master. |
As I said, I would make a new feature release for mockup (5.4.0) ... I only wanted to hear some feedback if this can go into staticresources=2.2.x (Plone 6.1) or we need a feature release there too, which further leads to maintenance branches here. Some overhead, but we could handle this ... |
I tried it in 6.1, and it works nicely. Thanks! I am inclined to say it is fine to include in a Plone 6.1 bug fix release. I suppose there is some chance of breakage, at least breakage in expectation if someone was relying on the old behavior, but I would say that for most people this simply solves a bug. |
Thanks @mauritsvanrees ... so to be safe, we could bump staticresources to |
@petschki Yes, that sounds good. |
09e7ecd
to
fbc7a7b
Compare
@pgrunewald I rebased your branch and now the tests are breaking. Have you fixed the structure tests? Did I remove something? Sorry for this! |
I'll take a look it and repair it right away if I can. |
The selection button shows now the number of selected and maximum number of items within the current folder. The corresponding popover offers the option to select all items, all visible items on the page and to cancel the selection. The previous popover to manage the selected items is gone. There are also some minor fixes, e.g. one to prevent degrading the breadcrumb to show only ids, but rather keep the titles. The upper-left checkbox in the table for selecting all the items has now a tooltip.
* remove select all context action * fix count on selection button * fix tests
fbc7a7b
to
12f2127
Compare
@petschki I rebased onto master from my local version. Tests run through again. :) |
Thanks! |
I'll prep a PR in staticresources ... there might break some robottests which needed to be fixed before releasing it. |
If you need help with the robottest, i have free timeslots tomorrow. |
@1letter great. See plone/plone.staticresources#384 |
Done, see: plone/plone.staticresources#384 and plone/Products.CMFPlone#4193 |
This fixes plone/Products.CMFPlone#3933
I think persistent selections creates more problems that it solves. With this PR it resets the selection whenever the path is changed.
Let me know, if something more is needed.
As a side note, I had problems with the commit-linter
I had to by-pass the commit-linter via
git commit --no-verify -m "..."
.This was the error: