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

Permissions ui #107

Merged
merged 21 commits into from
Aug 7, 2020
Merged

Permissions ui #107

merged 21 commits into from
Aug 7, 2020

Conversation

jtomeck
Copy link
Contributor

@jtomeck jtomeck commented Jul 1, 2020

Created the menu and modal based on the permissions mockup. I believe this is ready for @AlmightyYakob to start tying in the functionality?

Closes #82
Depends on multinet-app/multinetjs#15
Depends on multinet-app/multinet-server#430

@jtomeck jtomeck added the ui label Jul 1, 2020
@jtomeck jtomeck requested review from waxlamp and jjnesbitt July 1, 2020 15:57
@jtomeck jtomeck self-assigned this Jul 1, 2020
@jtomeck jtomeck marked this pull request as draft July 1, 2020 18:16
@jjnesbitt
Copy link
Member

We'll probably want to pull this menu item out into it's own component, for both organization as well as to accommodate for #106, as I was planning on placing the button for the AQL dialog in that menu. If it's okay with you @jtomeck I can try pulling this out into it's own component, so that I can rebase my branch for #106 off of this one, while we wait for backend functionality.

@jjnesbitt
Copy link
Member

@jtomeck I've factored out the new dialog into it's own component, and it seems to behave the same as before. Maybe you could verify this as well.

@jjnesbitt jjnesbitt mentioned this pull request Jul 3, 2020
@waxlamp
Copy link
Contributor

waxlamp commented Jul 8, 2020

This is looking good. Some specific thoughts:

  • The v-switch being used for whether the workspace is public doesn't seem clear enough. I think it's a classic problem of v-switch usage. I wonder if replacing it with a checkbox, and changing the lock icon for the word Public would be helpful. Thoughts, @jtomeck?
  • We need a mechanism for removing someone's permissions altogether--this would naturally be something like an X that we could click to remove a name from the list.
  • The "owner" role can't be easily changed to a different role the same way other roles can be granted and managed. That is, the owner of a workspace is a special position, and should maybe be indicated as such.
    • A bit more follow-up detail: ownership can only by changed by initiating a "transfer" operation (similar to how it's done on GitHub, with flashing red warning lights and a confirmation dialog), and I believe this would need to be a special dialog that's separated from this more ordinary level of permissions management.

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 3, 2020

Sorry for taking a while to get back into this PR. I will be taking a look tomorrow first thing in the morning and will leave a review on everything that's been done so far!

@jjnesbitt
Copy link
Member

Sorry for taking a while to get back into this PR. I will be taking a look tomorrow first thing in the morning and will leave a review on everything that's been done so far!

FYI what I've just pushed won't allow for deploy previews until multinet-app/multinetjs#15 is updated, and the version in the client is bumped.

@waxlamp
Copy link
Contributor

waxlamp commented Aug 3, 2020

Sorry for taking a while to get back into this PR. I will be taking a look tomorrow first thing in the morning and will leave a review on everything that's been done so far!

FYI what I've just pushed won't allow for deploy previews until multinet-app/multinetjs#15 is updated, and the version in the client is bumped.

@jtomeck, I can help you set up your local build to work properly--just let me know when you're working on it and I'll try to get some time to help you out (or @AlmightyYakob can do it as well).

@waxlamp
Copy link
Contributor

waxlamp commented Aug 4, 2020

One piece of feedback that I mentioned to @jtomeck in a meeting, but recording here for everyone else: the v-switch with the lock icon just feels wrong to me: workspaces are, by default, "private" and they can be made public by taking an action. Therefore, I think the option should be controlled by a checkbox, and rather than an icon that indicates whether it's "locked" or not (which is the wrong metaphor), I'd like for the checkbox to have an explicit description on it, something along the lines of Make this workspace public, possibly with a hoverable question mark that further explains what that means (that all users, including ones who are not logged in, will be able to view the workspace and run queries on it). This checkbox should also go above the part of the UI that lists users and their permissions (or, just below that part), since it is really a type of permission grant, rather than some special property of the workspace.

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 4, 2020

@waxlamp

This checkbox should also go above the part of the UI that lists users and their permissions (or, just below that part), since it is really a type of permission grant, rather than some special property of the workspace.

I vote for below. Is this something you want me to take care of on this PR, or do you just want my review on things for now and a discussion on future plans?

@jjnesbitt
Copy link
Member

I vote for below. Is this something you want me to take care of on this PR, or do you just want my review on things for now and a discussion on future plans?

Discussed offline, I'll make this change.

@jjnesbitt
Copy link
Member

This checkbox should also go above the part of the UI that lists users and their permissions (or, just below that part), since it is really a type of permission grant, rather than some special property of the workspace.

Above:

Screenshot from 2020-08-04 14-05-14

Below:

Screenshot from 2020-08-04 14-04-37

I personally think above looks better, what do you guys think?

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 4, 2020

I personally think above looks better, what do you guys think?

@AlmightyYakob personally I think it gets a bit lost above. What I was thinking when I said below was pairing it with the action buttons on the left side of the modal's footer.

@JackWilb
Copy link
Member

JackWilb commented Aug 4, 2020

I prefer below, too

@jjnesbitt
Copy link
Member

@jtomeck how's this look
Screenshot from 2020-08-05 11-45-12

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 5, 2020

Looks great! Precisely what I was envisioning :)

@JackWilb
Copy link
Member

JackWilb commented Aug 5, 2020

@AlmightyYakob I'm unable to access the permissions for workspaces that I own at the moment, even ones that I've just made. Is there some issue with the permissions logic for viewing the modal?

@waxlamp
Copy link
Contributor

waxlamp commented Aug 5, 2020

@AlmightyYakob can you change the text on the checkbox to Make this workspace public?

How hard is it to add a small question mark icon after that text that on hover opens a popover that explains what "public" means?

@jjnesbitt
Copy link
Member

@AlmightyYakob can you change the text on the checkbox to Make this workspace public?

How hard is it to add a small question mark icon after that text that on hover opens a popover that explains what "public" means?

Not hard, but what would you want the tooltip to say?

@jjnesbitt
Copy link
Member

@AlmightyYakob I'm unable to access the permissions for workspaces that I own at the moment, even ones that I've just made. Is there some issue with the permissions logic for viewing the modal?

I have no issue locally, are you running this locally? And are you logged in?

@waxlamp
Copy link
Contributor

waxlamp commented Aug 5, 2020

@AlmightyYakob I'm unable to access the permissions for workspaces that I own at the moment, even ones that I've just made. Is there some issue with the permissions logic for viewing the modal?

You need to make sure you have all three of the following set up locally:

  • this branch of multinet-client
  • the workspace-permission-endpoints branch of multinet-server
  • the workspace-permissions branch of multinetjs
    • this also needs to be yarn linked into multinet-client

Regarding multinetjs, we just published 0.16.0 which includes the workspace-permissions branch, so you can probably just update your multinet-client package.json multinet version and re-run yarn install.

@waxlamp
Copy link
Contributor

waxlamp commented Aug 5, 2020

@AlmightyYakob can you change the text on the checkbox to Make this workspace public?
How hard is it to add a small question mark icon after that text that on hover opens a popover that explains what "public" means?

Not hard, but what would you want the tooltip to say?

Public workspaces are readable by all users, even those who are not logged in. You can revoke this at any time by unchecking the box.

@JackWilb
Copy link
Member

JackWilb commented Aug 5, 2020

@AlmightyYakob I'm unable to access the permissions for workspaces that I own at the moment, even ones that I've just made. Is there some issue with the permissions logic for viewing the modal?

I have no issue locally, are you running this locally? And are you logged in?

No, I'm using the deploy preview and I'm logged in. I guess I need the server branch that Roni referred to up there ^^.

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 5, 2020

@AlmightyYakob can you change the text on the checkbox to Make this workspace public?
How hard is it to add a small question mark icon after that text that on hover opens a popover that explains what "public" means?

Not hard, but what would you want the tooltip to say?

Public workspaces are readable by all users, even those who are not logged in. You can revoke this at any time by unchecking the box.

This is kind of a long tooltip. I'd recommend removing the second sentence.

@waxlamp
Copy link
Contributor

waxlamp commented Aug 5, 2020

@AlmightyYakob can you change the text on the checkbox to Make this workspace public?
How hard is it to add a small question mark icon after that text that on hover opens a popover that explains what "public" means?

Not hard, but what would you want the tooltip to say?

Public workspaces are readable by all users, even those who are not logged in. You can revoke this at any time by unchecking the box.

This is kind of a long tooltip. I'd recommend removing the second sentence.

I'm ok with that, but I don't want this in a tooltip, I want it in a popover. Sometimes you see these in the wild appearing on terms with a dotted gray underline, and the popover generally means a slightly longer message is tolerable. I wish I had an example I could point you to off the top of my head 😕

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 5, 2020

I'm ok with that, but I don't want this in a tooltip, I want it in a popover. Sometimes you see these in the wild appearing on terms with a dotted gray underline, and the popover generally means a slightly longer message is tolerable. I wish I had an example I could point you to off the top of my head 😕

Yeah I'm cool with doing that. If you want to keep the second sentence it's not hurting anything. I just think it's a little extra and want to make sure it's not making anything too busy, since it's explaining obvious functionality of the checkbox, imo.

@waxlamp
Copy link
Contributor

waxlamp commented Aug 5, 2020

I'm ok with that, but I don't want this in a tooltip, I want it in a popover. Sometimes you see these in the wild appearing on terms with a dotted gray underline, and the popover generally means a slightly longer message is tolerable. I wish I had an example I could point you to off the top of my head confused

Yeah I'm cool with doing that. If you want to keep the second sentence it's not hurting anything. I just think it's a little extra and want to make sure it's not making anything too busy, since it's explaining obvious functionality of the checkbox, imo.

My goal with that second sentence is to reassure the user that they're not doing anything irrevocable (to strengthen the fact that it's a checkbox). Because it's a matter of turning what was private into something that is very public, the extra hand-holding is worthwhile IMO.

@jjnesbitt
Copy link
Member

Thoughts? @waxlamp @jtomeck
Screenshot from 2020-08-06 12-13-02

@waxlamp
Copy link
Contributor

waxlamp commented Aug 6, 2020

I like it 😄

@jtomeck
Copy link
Contributor Author

jtomeck commented Aug 6, 2020

I like it as well. Nice work!

@jtomeck jtomeck merged commit 8570f36 into master Aug 7, 2020
@jtomeck jtomeck deleted the permissions-ui branch August 7, 2020 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UI for user permissions settings
4 participants