swag-for-dev icon indicating copy to clipboard operation
swag-for-dev copied to clipboard

Improve tags UI/X

Open vikaspotluri123 opened this issue 7 years ago • 12 comments

Currently tags are all lower case:

image

They would look better if they were Sentence cased

vikaspotluri123 avatar Oct 10 '18 02:10 vikaspotluri123

One way of doing it is to use the CSS ::first-letter pseudo-element:

p.sentence-case::first-letter {
  text-transform: uppercase;
}
<p class="sentence-case">this string has a CAPITAL first-letter</p>

aslafy-z avatar Oct 10 '18 20:10 aslafy-z

Or just p.sc { text-transform: capitalize; }?

I'd rather do this during the build step to keep the client minimal, but if you want to go the CSS route, that's fine

vikaspotluri123 avatar Oct 10 '18 20:10 vikaspotluri123

Yes, but text-transform: capitalize does Title Case not Sentence case. I think we can go title case. I don't know which way of implementation would be better as it would add some logic to keep tags in url lowercase if done on buildtime.

aslafy-z avatar Oct 11 '18 10:10 aslafy-z

I have mostly seen tags as being lowercase everywhere. Can you provide examples where sentence-case is used?

swapagarwal avatar Oct 11 '18 17:10 swapagarwal

I agree with @swapagarwal here!

plibither8 avatar Oct 11 '18 17:10 plibither8

Good point, to me personally, there's something visually off in the select box; it might be the caps or something else (outside from the persistent scrollbar) 😕

vikaspotluri123 avatar Oct 11 '18 17:10 vikaspotluri123

I guess we should get rid of the search box. There are not many tags right now (and won't be in the future, most probably), and search is not possible on mobile devices by default.

The scrollbar can be hidden by just adding overflow: hidden to the custom CSS.

plibither8 avatar Oct 11 '18 17:10 plibither8

The UI can be made more consistent, yes. How about merging the tag filters with the difficulty bar above it?

swapagarwal avatar Oct 11 '18 17:10 swapagarwal

Updated the issue title to reflect the change in roadmap

vikaspotluri123 avatar Oct 11 '18 17:10 vikaspotluri123

I'll try working on this if it hasn't been picked up by anyone else :sweat_smile:

plibither8 avatar Oct 11 '18 17:10 plibither8

I'm not working on it, go ahead 👍

vikaspotluri123 avatar Oct 11 '18 17:10 vikaspotluri123

Related to https://github.com/swapagarwal/swag-for-dev/issues/407

aslafy-z avatar Oct 09 '19 17:10 aslafy-z