-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Improve invite modal to include pills and dropdown. #9992
Conversation
43945fa
to
b02eee3
Compare
static/js/invite.js
Outdated
function update_subscription_checkboxes() { | ||
$('#streams_to_add').html(templates.render('invite_subscription', { | ||
streams: exports.get_invite_streams(), | ||
})); |
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.
nitpick: I prefer a style where you can read the code in the order it happens:
var data = {stream: exports.get_invite_streams()};
var html = template.render('invite_subscription', data);
$('#streams_to_add').html(html)
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.
yeah, this is way much better, just confused as once I was asked to not prefer variable if used only once, but it makes sense here to use otherwise the line becomes long... so changing it to this
b02eee3
to
b612506
Compare
b612506
to
1e4a5ce
Compare
#7998 can be closed now Few other feedbacks required:
|
1e4a5ce
to
66b25f5
Compare
<input type="radio" name="invite_as_admin" value="true"/>{{ _('Organization administrators') }} | ||
</label> | ||
<div class="control-group"> | ||
<label class="control-label" for"invite_as">{{ _('User(s) join as') }}</label> |
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.
(for me) TODO: fix for
Hmm, I thought I'd replied to your questions. I think case-insensitive alphabetical sort is fine to start. And yeah, lock icon for private streams is good. |
b259d12
to
ef342a0
Compare
@timabbott I've rebased the PR and I think first four commits are mergeable. |
Two problems with the first commit:
|
yeah, Members sounds good. I would also make it "Administrators" rather than "Organization administrators". |
Okay, I'm updating your second point. |
Yeah, on the styling front, I think it's worth your doing the minimal positioning work if it's quick to keep things mergable (i.e. not looking broken); that way we can merge the OK-looking version and then Max can restyle it to look great. Having a window where things are broken in master is difficult to manage. |
ef342a0
to
1ff72d4
Compare
e4a9322
to
feb0387
Compare
I've updated the PR with following changes:
For icons I was thinking to do that in separate PR as for that I think I've to do a little refactoring in input_pills.js for custom pill HTML. |
I merged the first two commits; I believe that the dropdown change unblocks what we need for the "Guest users" feature, so we can consider that feature no longer blocked on finishing this. I'm holding off on the stream pills mostly because I want to talk with @rishig about a use case that the pills don't support well (namely, easily seeing what streams a user isn't being added to as part of deciding how to set things up). I haven't figured out how big of a problem that is, but being able to see which streams were not currently included was a feature I found myself appreciating when setting up an organization for a hackathon this weekend. |
Heads up @shubhamdhama, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
hm, interesting thought. For large realms (100+ streams) it seems like not much value, but I can see the benefit for a realm with 10 streams. I could imagine putting |
This currently don't affect invite modal as this code will be used in further commits.
feb0387
to
61d16c1
Compare
(okay, let me know when we have reached the final consensus) |
Heads up @shubhamdhama, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
Closing this as two commits are merged and as a reference of pills work and also I'm going to work on the new idea suggested here https://chat.zulip.org/#narrow/stream/6-frontend/subject/Invite.20Modal/near/638686 |
This question is independent of whether we have pills for the streams list. I do still think some version of this is a good idea, though may have to wait for Tim and I to be able to talk about it. |
Current commits can be merged if they look great, I'll be adding further work soon.