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

Sanitizes tutorial tags before grouping [Fixes #2020] #2034

Merged
merged 3 commits into from Dec 3, 2020
Merged

Sanitizes tutorial tags before grouping [Fixes #2020] #2034

merged 3 commits into from Dec 3, 2020

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented Dec 3, 2020

Description

Reduces allTags down to array of unique tags after sanitizing them with .toLowerCase().trim(). This array is then sorted by name, since the previously capitalized tags are at the top from the returned query data.

Now for example: If you list "JavaScript " when making a new tutorial markdown, it will lump with "javascript", sum up the totals for each, and display "JAVASCRIPT" with the proper sum on the UI. Clicking this will properly filter for all of them, as all tags are forced to lowercase and trimmed before being stored in the allTutorials constant.

Kept styling logic separate, leaving the CSS to style these as uppercase.

Related Issue #2020

@github-actions github-actions bot added the needs review 👀 Review is needed for this issue or pull request label Dec 3, 2020
Copy link
Contributor

@samajammin samajammin left a comment

Choose a reason for hiding this comment

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

Nicely done!

@samajammin samajammin merged commit 5064479 into ethereum:dev Dec 3, 2020
@samajammin samajammin mentioned this pull request Dec 3, 2020
@wackerow wackerow deleted the w/tutorialTags#2020 branch December 3, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review 👀 Review is needed for this issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants