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

Recommended fixes/changes to organizations #189

Merged
merged 13 commits into from
Nov 16, 2023
Merged

Conversation

DaveDarsa
Copy link
Contributor

  1. changes organization header gradient
  2. changes various button tooltips
  3. changes "view in dashboard" link
  4. changes some of the placeholders
  5. removes border highlight on non clickable table rows

@shreddedbacon
Copy link
Member

shreddedbacon commented Nov 8, 2023

The header gradient to me seems a bit off, I was initially thrown off by it when I had a quick look because I thought maybe something with the page rendered incorrectly

If the idea of the gradient is to distinguish you're in a different part of the UI for organizations, it doesn't really make it obvious

@DaveDarsa DaveDarsa mentioned this pull request Nov 9, 2023
15 tasks

const isOrganizationsPath = asPath.includes('/organizations');

console.log(isOrganizationsPath);
Copy link
Contributor

Choose a reason for hiding this comment

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

A wild console.log() appears :)

@DaveDarsa DaveDarsa changed the title some recommended fixes/changes to organizations Recommended fixes/changes to organizations Nov 10, 2023
</span>
<Tooltip overlayClassName="orgTooltip" placement="bottom" title="View user">
<>
<Link href={linkData.urlObject} as={linkData.asPath}>
Copy link
Contributor

Choose a reason for hiding this comment

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

The view user links here fail if the administator isn't in any groups in the organization. A user can be an administator but not a user/in any groups in the org. Not sure if these view user links are necessary on this page?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, the userByEmailAndOrganization query returns null on the user page for those kind of users.
What if we have a a different view on this page if that happens?
We could also do a check in the background - if the query returns null we disable the links for those specific users?
@shreddedbacon @tobybellwood

Copy link
Member

Choose a reason for hiding this comment

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

That is a lot of queries to perform when rendering the page potentially, a lot of these user queries are not very cached at the moment. So performing them often could see some performance impacts over time.

If you can handle the null user experience with some sort of message that says the user is not in any groups, then that would be fine.

Alternatively, not linking the administrators of an organization to the users that are contained within the groups is also a pretty good idea.

Copy link
Member

Choose a reason for hiding this comment

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

I'm worried that there is going to be too much circular references in the organizations UI component that will get people clicking around and landing in all sorts of spots.

Like, the administrators of the organization are just that, and linking the user OUT of the management view into a view where they can then manage the users who are contained within the groups of the organization, which then leads them into all other parts of the management of organizations.

If I know I need to manage the organizations administrators, simplying going to manage to add, edit, or remove a user as an admin is all I should be able to do there, IMO

@shreddedbacon
Copy link
Member

Some small issues/wording changes


On the manage page of the organzations UI when removing a user that has some manager level, the tooltip on the button should change from Delete user to Remove user as you aren't deleting the user from lagoon, you're removing their access to manage the organization.
image
Suggested wording:

This action will remove user default-user@ben-testing from management of the organization ben-test-org.

On the projects page of the organizations UI, when deleting a project, the message says it will delete it from the organization. This isn't entirely accurate, as it is a destructive action. The project is completely deleted from Lagoon, not just deleted from the organization.
image
Suggested wording?:

This action will delete project ben-testing from Lagoon and the organization.

@DaveDarsa
Copy link
Contributor Author

@shreddedbacon @tobybellwood @CGoodwin90 I've tried numerous ways to include the <ErrorAlert /> component we use for cancelling deployment/task and in new environments.

The problem lies with either the <Mutation /> component from apollo, or react-modal that we use - multiple instances of errors get rendered; even if we limit the alert component to just one, the old instance gets destroyed and replaced with a new one, which ruins the UX.

Aside from that, I think this pr is good to go.

Copy link
Member

@tobybellwood tobybellwood left a comment

Choose a reason for hiding this comment

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

Happy that this addresses the outstanding concerns

@DaveDarsa DaveDarsa merged commit 9a76e76 into main Nov 16, 2023
@DaveDarsa DaveDarsa deleted the Some-organizations-changes branch November 16, 2023 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants