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

Add labels in connect window #300

Merged
merged 1 commit into from
May 7, 2016
Merged

Add labels in connect window #300

merged 1 commit into from
May 7, 2016

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented May 7, 2016

Adds id/for in connect window so the labels are correctly linked.

Also makes port field a number type with min/max set.

@xPaw xPaw added Type: Feature Tickets that describe a desired feature or PRs that add them to the project. second review needed labels May 7, 2016
@AlMcKinlay
Copy link
Member

Looks fine. Only thing is you appear to have added 2 aria labels, and no more. Is this deliberate?

@xPaw
Copy link
Member Author

xPaw commented May 7, 2016

Only thing is you appear to have added 2 aria labels, and no more. Is this deliberate?

Yep. I added them because there's two fields (ip/port) but only one label, and adding aria labels describes the fields further.

@AlMcKinlay
Copy link
Member

Ah right, makes sense.

👍 and merging

@AlMcKinlay AlMcKinlay merged commit 7cf09b7 into master May 7, 2016
@AlMcKinlay AlMcKinlay deleted the xpaw/update-forms branch May 7, 2016 10:26
<div class="col-sm-9">
<input class="input" name="name" value="<%= defaults.name %>">
<input class="input" id="connect:name" name="name" value="<%= defaults.name %>">
Copy link
Member

Choose a reason for hiding this comment

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

For future references, I think we should avoid using : in ids. I believe they need escaping if we want to grab them with jQuery or CSS, and in CSS it would look confusing as : is used for pseudo-elements.

I get the idea of namespacing though, and I think using - or _ for that works fine too.

Copy link
Member Author

Choose a reason for hiding this comment

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

@maxpoulin64 used : in settings PR, so I went with same notation.

Copy link
Member

Choose a reason for hiding this comment

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

I see. I still think we should avoid this for the 2 reasons given above.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @astorije there. I totally didn't think at all about ever wanting to use those names in CSS selectors. I guess the only real option here is to use _ as everything else seems to be reserved (and - is used as a space replacement since we don't CamelCase CSS names). I wish there was a better looking character for representing namespaces that's not so close to - but apparently it's [a-zA-Z0-9_-]. Too bad, : made it easy to avoid id conflicts and looked good 😞 We could always escape it but it quickly gets ugly, especially in JS strings due to double escaping: $("#connect\\:name").

@astorije astorije added this to the ★ Next Release milestone May 15, 2016
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
@AlMcKinlay AlMcKinlay removed their assignment Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants