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

Let sidebar uppercase more than dvc in labels made from slugs #3602

Merged
merged 7 commits into from
May 30, 2022

Conversation

julieg18
Copy link
Contributor

Fixes #3601

* Let sidebar uppercase more than `dvc` in labels made from slugs
@julieg18 julieg18 self-assigned this May 30, 2022
@@ -23,12 +23,22 @@
const { titleCase } = require('title-case')
const sidebar = require('../../../sidebar')

const uppercaseKeywords = ['dvc', 'cml', 'api', 'ml']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorgeorpinel, these are the keywords that will be uppercased. Does the list look good?

Copy link
Member

Choose a reason for hiding this comment

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

let's add MLEM, LDB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

List is now ['dvc', 'cml', 'api', 'mlem', 'ml', 'ldb'] :)

@@ -620,7 +620,6 @@
"slug": "dvclive-with-dvc"
},
{
"label": "ML Frameworks",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the sidebar code automatically uppercases ml and api, these two labels can be taken off.

@gatsby-cloud
Copy link

gatsby-cloud bot commented May 30, 2022

Gatsby Cloud Build Report

dvc.org

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 2m

Performance

Lighthouse report

Metric Score
Performance 🔶 63
Accessibility 💚 98
Best Practices 🔶 83
SEO 💚 93

🔗 View full report

@julieg18 julieg18 requested review from jorgeorpinel and a team May 30, 2022 13:10
@julieg18 julieg18 added the A: website Area: website label May 30, 2022
Copy link
Member

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

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

Good stuff, @julieg18 - some optimization I think is possible that makes sense + some cleanup (?)

@julieg18 julieg18 requested a review from a team May 30, 2022 16:56
@julieg18 julieg18 requested a review from a team May 30, 2022 20:07
@shcheklein shcheklein merged commit fcc5ef2 into master May 30, 2022
@shcheklein shcheklein deleted the update-sidebar-label-creation branch May 30, 2022 20:47
@julieg18 julieg18 mentioned this pull request May 31, 2022
3 tasks
@jorgeorpinel
Copy link
Contributor

Last Q. There's also the opposite feature i.e. some words are kept lower case, like and. Where is that defined? Thanks

jorgeorpinel added a commit that referenced this pull request Jun 1, 2022
@julieg18
Copy link
Contributor Author

julieg18 commented Jun 1, 2022

The title-case package that we use lowercases words like and for us! But if we wanted a feature like this, it should be easy to implement.

@jorgeorpinel
Copy link
Contributor

Ah thanks for the info. Will mention in iterative/gatsby-theme-iterative#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow more than dvc to be uppercased in our sidebar.json slugs
3 participants