Skip to content
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

FEATURE: Improve User sorting behavior in user management backend module #4443

Merged
merged 7 commits into from
Feb 3, 2024

Conversation

crydotsnake
Copy link
Member

Review instructions

Improves the behavior for the sorting functionality in the user management module. I got the inspiration from the redirects module and kinda liked how it is there.

Video

after.mov

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the [lowest maintained branch](https://www.neos.io/features/release-roadmap.html)
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

@crydotsnake crydotsnake requested review from Sebobo and ahaeslich August 4, 2023 12:14
@bwaidelich bwaidelich changed the title 9.0: FEATURE: Improve User sorting behavior in user backend module FEATURE: Improve User sorting behavior in user backend module Aug 4, 2023
@crydotsnake
Copy link
Member Author

Are you also fine with the Icon? or would you say the icon that we use in the redirecthandler-ui would fit better?:

RedirechthandlerUI:

redirecthandlerui1

redirecthandlerui2

User Management Module:

usermanagementmodule2
usermanagementmodule1

@MarcoPNS
Copy link
Contributor

MarcoPNS commented Aug 9, 2023

Don't know if this is the right place to discuss this but if you already start to make the user area better sortable, maybe a sorting by role would be helpful too 👍

@crydotsnake
Copy link
Member Author

Don't know if this is the right place to discuss this but if you already start to make the user area better sortable, maybe a sorting by role would be helpful too +1

Hello Marco,

Feel free to put this in a new issue 🙂

Copy link
Member

@ahaeslich ahaeslich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crydotsnake thx for this PR and looking at the video I have to ask:

  • Is there any default sorting that could be made visible for the user? Naturally only if the property is displayed in the table.
  • What do you think of indicating to the user that the table is sortable by not just relying on a hover effect?
  • And as addition to my second question: Would you like this change to also include accessbility concerns? For example the link doesn't give an indication that it behaves like a button and is triggering a sorting of the table.

@crydotsnake
Copy link
Member Author

@crydotsnake thx for this PR and looking at the video I have to ask:

  • Is there any default sorting that could be made visible for the user? Naturally only if the property is displayed in the table.

By default not. It gets only visible, when you click on the specific filter option in the table.

  • What do you think of indicating to the user that the table is sortable by not just relying on a hover effect?

Tbh. I dont have an idea at the moment how this could be more visible for the user. The only thing i could imagine is, that when you hover over one of the links, you get like a hover title that says: "Sort by user" for example. What would you think about this?

  • And as addition to my second question: Would you like this change to also include accessbility concerns? For example the link doesn't give an indication that it behaves like a button and is triggering a sorting of the table.

Same as above. I'm a bit clueless at this point how it could be more improved for the user. But if you think it could still be improved, maybe we can have a catch up in slack too discuss this if you want :)

Hope i understood all your questions as good as possible.

@crydotsnake
Copy link
Member Author

crydotsnake commented Aug 11, 2023

Edit:

By default not. It gets only visible, when you click on the specific filter option in the table.

I just checked it. If you switch too the user managment module, the filter option by default is on Account and roles.

2023-08-11_22-59

But i assume this was not what you mean in your question.

@crydotsnake
Copy link
Member Author

crydotsnake commented Aug 12, 2023

Hm. I added a title so when you hover it says: "Sort by last login" for example. But for some reason the translation for sorting the name, is the same as for the last login date which i dont really understand.

Demo

Peek 2023-08-12 10-19

Code

<f:section name="headerLabel">
	<f:if condition="{sortBy} === {sortingField}">
		<f:then>
			<f:if condition="{sortDirection} === 'ASC'">
				<f:then>
					<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.AccountsAndRoles')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortDirection: 'DESC', sortBy: sortingField}" addQueryString="TRUE">
						<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
						<i class="fas fa-caret-up"></i>
					</f:link.action>
				</f:then>
				<f:else>
					<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.Name')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortDirection: 'ASC', sortBy: sortingField}" addQueryString="TRUE">
						<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
						<i class="fas fa-caret-down"></i>
					</f:link.action>
				</f:else>
			</f:if>
		</f:then>
		<f:else>
			<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.LastLogin')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortBy: sortingField}" addQueryString="TRUE">
				<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
			</f:link.action>
		</f:else>
	</f:if>
</f:section>

What could cause this?

@crydotsnake
Copy link
Member Author

Hm. I added a title so when you hover it says: "Sort by last login" for example. But for some reason the translation for sorting the name, is the same as for the last login date which i dont really understand.

Demo

Peek 2023-08-12 10-19

Code

<f:section name="headerLabel">
	<f:if condition="{sortBy} === {sortingField}">
		<f:then>
			<f:if condition="{sortDirection} === 'ASC'">
				<f:then>
					<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.AccountsAndRoles')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortDirection: 'DESC', sortBy: sortingField}" addQueryString="TRUE">
						<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
						<i class="fas fa-caret-up"></i>
					</f:link.action>
				</f:then>
				<f:else>
					<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.Name')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortDirection: 'ASC', sortBy: sortingField}" addQueryString="TRUE">
						<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
						<i class="fas fa-caret-down"></i>
					</f:link.action>
				</f:else>
			</f:if>
		</f:then>
		<f:else>
			<f:link.action title="{neos:backend.translate(source: 'Modules', id: 'users.sortBy.LastLogin')}" action="index" data="{neos-toggle: 'tooltip'}" arguments="{sortBy: sortingField}" addQueryString="TRUE">
				<neos:backend.translate id="{labelIdentifier}" source="Modules" package="Neos.Neos"/>
			</f:link.action>
		</f:else>
	</f:if>
</f:section>

What could cause this?

Now i see why its not working 🤦🏽‍♂️ I will find another way too add this.

@crydotsnake crydotsnake marked this pull request as draft August 29, 2023 18:14
@crydotsnake
Copy link
Member Author

Have you maybe an idea? @ahaeslich

@crydotsnake crydotsnake removed the request for review from Sebobo September 9, 2023 13:27
@crydotsnake crydotsnake force-pushed the feature/improve-user-sort-behavior branch from 102a5cb to ce0671c Compare November 7, 2023 18:34
@crydotsnake
Copy link
Member Author

Will try to continue working on that..

@crydotsnake crydotsnake force-pushed the feature/improve-user-sort-behavior branch from ce0671c to 4c38527 Compare December 2, 2023 12:21
@crydotsnake crydotsnake marked this pull request as ready for review December 2, 2023 13:42
@crydotsnake
Copy link
Member Author

I have adjusted the behavior so that it is easier for the user in the backend to see that they can click on something here. And when I move the mouse over the table header labels, I also see a title that describes the functionality.

Bildschirmaufnahme 2023-12-02 um 14 46 14

@crydotsnake crydotsnake changed the title FEATURE: Improve User sorting behavior in user backend module FEATURE: Improve User sorting behavior in user management backend module Dec 2, 2023
@dlubitz
Copy link
Contributor

dlubitz commented Dec 6, 2023

@crydotsnake Thanks for this PR. Could you please remove the german translations in this PR? Our translation workflow should be: add keys and defaults (EN) in XLIFF file and add translations afterwards with weblate. Weblate will create the corresponding xliff files for the languages. (See https://www.neos.io/de/community/participate/translating-neos.html)

Rest looks fine for me. 👍

@crydotsnake crydotsnake force-pushed the feature/improve-user-sort-behavior branch from 6d21c61 to 84eb02c Compare December 16, 2023 09:01
@crydotsnake
Copy link
Member Author

Done @dlubitz

@dlubitz
Copy link
Contributor

dlubitz commented Dec 16, 2023 via email

@crydotsnake crydotsnake force-pushed the feature/improve-user-sort-behavior branch from 54cd095 to 10b4754 Compare December 16, 2023 11:25
Copy link
Member

@bwaidelich bwaidelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 by reading, thanks!

@crydotsnake crydotsnake requested a review from mhsdesign January 17, 2024 16:08
@mhsdesign
Copy link
Member

image

That doesnt seem right 😅
May it be that the css build is not minified?

NODE_ENV=production might do the trick.

@crydotsnake
Copy link
Member Author

image That doesnt seem right 😅 May it be that the css build is not minified?

NODE_ENV=production might do the trick.

Oops. Yes

There is a command for building the files for production:

build:styles:prod

Now it should look fine.

@mhsdesign
Copy link
Member

mhsdesign commented Jan 17, 2024

As unminifed stylesheets are always quite big, i would suggest to squash the previous both commits ;) So they dont appear in the history ^^

@crydotsnake crydotsnake force-pushed the feature/improve-user-sort-behavior branch from 578ba24 to 53da818 Compare February 3, 2024 10:35
@mhsdesign mhsdesign merged commit d182715 into neos:9.0 Feb 3, 2024
9 checks passed
crydotsnake pushed a commit that referenced this pull request Jun 22, 2024
…ehavior

FEATURE: Improve User sorting behavior in user management backend module
crydotsnake pushed a commit that referenced this pull request Aug 19, 2024
…ehavior

FEATURE: Improve User sorting behavior in user management backend module
crydotsnake pushed a commit to crydotsnake/neos-development-collection that referenced this pull request Sep 1, 2024
…rt-behavior

FEATURE: Improve User sorting behavior in user management backend module
crydotsnake pushed a commit to crydotsnake/neos-development-collection that referenced this pull request Oct 5, 2024
…rt-behavior

FEATURE: Improve User sorting behavior in user management backend module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants