Skip to content

Conversation

@recrwplay
Copy link
Collaborator

Fixes an issue with some labels being wrongly parsed where the text before the first hyphen was used instead of the full label.

For example, aura-db-enterprise was being treated as aura because that is a valid label in rolesData.json.

There are essentially two types of labels:

  • 'version' labels, where we want to use only the text before the hyphen, eg new-5.20 for the label class and add the text after the hyphen as label text.
  • all other labels, where we take the whole label text and use that for the label class, and take the label text from rolesData.json

This PR also fixes an issue with discrete headings.
Labels are no longer displayed on discrete headings.

@netlify
Copy link

netlify bot commented Jun 3, 2024

Deploy Preview for neo4j-docs-ui ready!

Name Link
🔨 Latest commit 52f3123
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-docs-ui/deploys/665dc85995ae610008172f3f
😎 Deploy Preview https://deploy-preview-232--neo4j-docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@stefano-ottolenghi stefano-ottolenghi left a comment

Choose a reason for hiding this comment

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

Haven't tested, but code-wise and aparte the linting warnings LGTM.


roleDivs.forEach(function (roleDiv) {
var roles = roleDiv.classList
// ignore discrete headers
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd move the comment to before line 76, where the check happens.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Argh - well spotted. I actually meant to combine the if statements before committing

@recrwplay
Copy link
Collaborator Author

Haven't tested, but code-wise and aparte the linting warnings LGTM.

Thanks - I also fixed the linting warnings with the later commit

@recrwplay recrwplay merged commit a104a86 into master Jun 3, 2024
recrwplay added a commit that referenced this pull request Jun 3, 2024
Fixes an issue with some labels being wrongly parsed where the text
before the first hyphen was used instead of the full label.

For example, `aura-db-enterprise` was being treated as `aura` because
that is a valid label in rolesData.json.

There are essentially two types of labels:
- 'version' labels, where we want to use only the text before the
hyphen, eg `new-5.20` for the label class and add the text after the
hyphen as label text.
- all other labels, where we take the whole label text and use that for
the label class, and take the label text from rolesData.json

This PR also fixes an issue with discrete headings.
Labels are no longer displayed on discrete headings.
recrwplay added a commit to recrwplay/docs-ui that referenced this pull request Jul 22, 2024
Fixes an issue with some labels being wrongly parsed where the text
before the first hyphen was used instead of the full label.

For example, `aura-db-enterprise` was being treated as `aura` because
that is a valid label in rolesData.json.

There are essentially two types of labels:
- 'version' labels, where we want to use only the text before the
hyphen, eg `new-5.20` for the label class and add the text after the
hyphen as label text.
- all other labels, where we take the whole label text and use that for
the label class, and take the label text from rolesData.json

This PR also fixes an issue with discrete headings.
Labels are no longer displayed on discrete headings.
@recrwplay recrwplay deleted the roles-label-fix branch November 27, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants