Conversation
23fd062 to
c3ee143
Compare
c3ee143 to
6d435d7
Compare
…ows-ux-improvement-apply-workflow-setting-from-role-to-role
51f8201 to
5ebe35a
Compare
…ows-ux-improvement-apply-workflow-setting-from-role-to-role
Deploying openproject with ⚡ PullPreview
|
|
Hi @dfriquet, |
|
Hi @lindenthal,
I turned the link into an But obviously that’s not the case in OpenProject’s UX patterns. I walked my way around the admin settings and I see that |
7d55a67 to
6e2efe8
Compare
63c6154 to
4612050
Compare
bb88b2d to
56fe369
Compare
…s-ux-improvement-apply-workflow-setting-from-role-to-role
56fe369 to
32831e0
Compare
…s-ux-improvement-apply-workflow-setting-from-role-to-role
mrmir
left a comment
There was a problem hiding this comment.
Functionality wise, nice job, especially with all the dialog/state management. I did notice a few things that need changes however, before a deeper code review:
- Opening the page for a type does a very obvious two-part load, with the rest of the page coming in first and then the matrix being loaded. If this is something that you touched, is there a way to prevent that? Or is it just a factor of the size of the matrix and something we have to live with for types/roles with many check boxes?
- I think the copy dialog needs to be taller to prevent it from scrolling/prevent the 'target roles' dropdown from being cut off and hiding the buttons of the dialog:
- I expected to be redirected to the selected role when only one role is selected for copying, but I know being able to multi select them complicates the expected behaviour so it's fine to redirect to the first available role. However, can the flash messages be more descriptive? Maybe something like "Successfully copied to 'Anonymous' role." or "Successfully copied to 3 roles." or "Successfully copied to role: Anonymous". And while we're at it, also for when copying types?
There was a problem hiding this comment.
I-lost-count-falling-into-the-rabbit-holish
Oops, hopefully not too many more commits, but I found some more points:
- The AC/figma mockups show that even when copying to another type, it is possible to select multiple types at once but the implementation is single select only
- Can changing roles not be a full page reload easily?
- When making changes to the matrix, switching tabs by saving changes, and then switching back to the original tab, there is a flicker with the success banner visible for a short period before it disappears
- The status button is scrolling with a wide matrix again 🫠:
Co-authored-by: Mir Bhatia <mirdotbhatia@gmail.com>
| href: helpers.edit_workflow_path(@type, role_id: available_role.id, tab: @tab), | ||
| content_arguments: { data: { "admin--workflow-checkbox-state-confirmation-trigger": "click" }, target: "_top" } |
There was a problem hiding this comment.
Can changing roles not be a full page reload easily?
Yes, it can, with something like this:
| href: helpers.edit_workflow_path(@type, role_id: available_role.id, tab: @tab), | |
| content_arguments: { data: { "admin--workflow-checkbox-state-confirmation-trigger": "click" }, target: "_top" } | |
| href: helpers.edit_workflow_tab_path(@type, @tab, role_id: available_role.id), | |
| content_arguments: { data: { "admin--workflow-checkbox-state-confirmation-trigger": "click" } } |
I made this change on purpose so that the browser address bar URL matches the data shown on the page. Without a full page reload, one could land on this page with role_id=3, select another role and now the address bar is out of sync with the role actually edited. Sharing the current URL, for example, does not land on the same view.
That’s a problem from where I sit, but:
- it may not be a problem, and we can prefer smoother navigation over URL synchronization;
- there is a mechanism I can’t think of to achieve both goals.
There was a problem hiding this comment.
Hmm, but then this is a regression from the previous implementation, right? That did both, but I guess with the new components and different loading/reloading, it is a bit more difficult to get those to work together now. I'm not sure which I prefer tbh, so maybe @oliverguenther has an opinion?
There was a problem hiding this comment.
I would not worry about that too much for now, given that when we switch to a SelectPanel, the role switches need to be different anyway. You would be able to select multiple roles then. And maybe, in this case it doesn't make sense to keep it in the URL state?
There was a problem hiding this comment.
Fair point with the multi role selection changes, I guess it makes sense to keep navigation smooth and forget about the param/url for now
There was a problem hiding this comment.
Eventually, it’s not that simple: the role_id change is kept inside the turbo-frame and not reflected in the Tabs links => Clicking on User is author for instance loses the currently selected role. And that would be the same with multi-role selection.
And even if the role selector is in the tab, I guess we want to keep the current behaviour (staying on the same role selection) when switching tabs, right?
If so, I’ll broaden the turbo-frame boundary to encapsulate all dependent moving parts.
There was a problem hiding this comment.
And even if the role selector is in the tab, I guess we want to keep the current behaviour (staying on the same role selection) when switching tabs, right?
Yes, so I guess changes to the frame are necessary
There was a problem hiding this comment.
A lot of trial and error in the process, but I ended up with something satisfying. That broke some of the pristine/dirty state management — still on it.
| tag: :div, | ||
| classes: "op-primer-flash--item", | ||
| data: { | ||
| turbo_temporary: true, |
There was a problem hiding this comment.
When making changes to the matrix, switching tabs by saving changes, and then switching back to the original tab, there is a flicker with the success banner visible for a short period before it disappears
@mrmir I assumed this may be an OpenProject-wide expectation, therefore made the change at the generic component level. Good idea? 😬
There was a problem hiding this comment.
Yeah I don't see why those will ever need to be cached, so this works for me 👍🏽. Let's just hope it doesn't break something in some obscure way...
5be0199 to
c319c1f
Compare
c319c1f to
71e4e8b
Compare
|
|
||
| ++#%> | ||
|
|
||
| <%= component_wrapper do %> |
There was a problem hiding this comment.
The status button is scrolling with a wide matrix again 🫠:
This wrapper binds the subheader and the matrix together, and the sticky CSS rule doesn’t fix it anymore. I’m on it.
There was a problem hiding this comment.
I tried to find the right combination of sticky/scroll/visible until I shortcut it with an old trick we used to define application-wide:
// Make CSS "ignore" <turbo-frame> in DOM hierarchy.
// https://github.com/hotwired/turbo/issues/48#issuecomment-925760725
turbo-frame
display: contents
I admit I was surprised to push the first occurrence of this display: contents with all the ViewComponents and Turbo Streams in this project.
Ticket
https://community.openproject.org/wp/72383
What are you trying to accomplish?
Copyfeature for workflow;Screenshots
What approach did you choose and why?
Workflows::Copies::FromTypesController— and extracting theWorkflows::CopiesControllerfor good measure;Copyfeature completely;summaryroute to match the namespaced lighter controllers scheme ;Priorities;Merge checklist