Skip to content

fix(interior-left-nav): added dynamic svg title#319

Merged
marijohannessen merged 5 commits into
carbon-design-system:masterfrom
marijohannessen:tech-debt/dynamic-aria
Oct 2, 2017
Merged

fix(interior-left-nav): added dynamic svg title#319
marijohannessen merged 5 commits into
carbon-design-system:masterfrom
marijohannessen:tech-debt/dynamic-aria

Conversation

@marijohannessen

Copy link
Copy Markdown
Contributor

Overview

Resolves #243

Added dynamic svg title to the collapse arrow.

@tw15egan

Copy link
Copy Markdown
Contributor

👍 ✅

this.element.dataset.collapsed = true;
this.element.classList.add(this.options.classLeftNavCollapsing);

svgTitle.innerHTML = 'Expand nav pane';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two things here and https://github.com/carbon-design-system/carbon-components/pull/319/files#diff-2e7e5be2ee91d6de1c6604f6fa89bbf5R186:

  1. I’d suggest .textContent instead of .innerHTML - The latter triggers HTML parser
  2. i18n - I’d suggest putting the text to static options.expandTitle property and then make this line refer to this.options.expandTitle (Note that all static options work as default values for instance options)

selectorLeftNavListItemHasChildren:
'[data-interior-left-nav-with-children]',
selectorLeftNavCollapse: '[data-interior-left-nav-collapse]',
selectorLeftNavArrow: '[data-interior-left-nav-arrow]',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably we’d make it [data-interior-left-nav-arrow] title (and rename this property to selectorLeftNavArrowTitle). In this way, we can consolidate two qSA calls to one.

@asudoh asudoh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for making an update! Seems that the new commit marked my other comments stale - Bringing them back.

this.element.dataset.collapsed = true;
this.element.classList.add(this.options.classLeftNavCollapsing);

svgTitle.textContent = 'Expand nav pane';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please see: #319 (comment)

this.element.classList.remove(this.options.classLeftNavCollapsed);
this.element.classList.add(this.options.classLeftNavExpanding);

svgTitle.textContent = 'Collapse nav pane';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please see: #319 (comment)

'[data-interior-left-nav-with-children]',
selectorLeftNavListItemHasChildren: '[data-interior-left-nav-with-children]',
selectorLeftNavCollapse: '[data-interior-left-nav-collapse]',
selectorLeftNavArrow: '[data-interior-left-nav-arrow]',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please see: #319 (comment)

@marijohannessen

Copy link
Copy Markdown
Contributor Author

Yeah I didn't have time to get to it yesterday, sorry about that! I've addressed all your comments now @asudoh 😄

@asudoh asudoh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great thank you for making the changes @marijohannessen!

@marijohannessen marijohannessen merged commit 9aaa6bb into carbon-design-system:master Oct 2, 2017
joshblack added a commit to joshblack/carbon that referenced this pull request May 2, 2019
* docs: add CRA example

* chore: add examples dir ot testPathIgnorePatterns
joshblack pushed a commit to joshblack/carbon that referenced this pull request May 8, 2019
paul-palade added a commit to paul-palade/carbon that referenced this pull request May 21, 2026
Submitting 14 new pictograms from June 2026 and updated categories.
Updated master file. All additions and updates approved by BXD.
Addressing issues carbon-design-system#319, carbon-design-system#321, carbon-design-system#324 and carbon-design-system#325 in brand/pictograms.

### Changelog

**New**

`Cities`
- [x] chennai.svg
- [x] denver.svg
- [x] frankfurt.svg
- [x] los-angeles.svg
- [x] miami.svg
- [x] oslo.svg
- [x] perth.svg
- [x] san-jose.svg
- [x] taipei.svg

`Design and development`
- [x] technology-zone--finger.svg

`Electronics`
- [x] laptop.svg

`Lifestyle`
- [x] lotus--flower.svg

`Workplace`
- [x] men--showers.svg
- [x] women--showers.svg

**Updated**

`Lifestyle`
- half-note.svg
- hard--ice--cream.svg
  Updated alphabetical order in categories.yml
adamalston pushed a commit to adamalston/carbon that referenced this pull request May 26, 2026
* feat(pictograms): new Pictograms June 2026

Submitting 14 new pictograms from June 2026 and updated categories.
Updated master file. All additions and updates approved by BXD.
Addressing issues carbon-design-system#319, carbon-design-system#321, carbon-design-system#324 and carbon-design-system#325 in brand/pictograms.

### Changelog

**New**

`Cities`
- [x] chennai.svg
- [x] denver.svg
- [x] frankfurt.svg
- [x] los-angeles.svg
- [x] miami.svg
- [x] oslo.svg
- [x] perth.svg
- [x] san-jose.svg
- [x] taipei.svg

`Design and development`
- [x] technology-zone--finger.svg

`Electronics`
- [x] laptop.svg

`Lifestyle`
- [x] lotus--flower.svg

`Workplace`
- [x] men--showers.svg
- [x] women--showers.svg

**Updated**

`Lifestyle`
- half-note.svg
- hard--ice--cream.svg
  Updated alphabetical order in categories.yml

* Update packages/pictograms/pictograms.yml

Resolved two instances of `men--showers` in pictograms.yml

Co-authored-by: Mahmoud <132728978+maradwan26@users.noreply.github.com>

* chore: update snapshots

---------

Co-authored-by: Mahmoud <132728978+maradwan26@users.noreply.github.com>
Co-authored-by: Mahmoud <maradwan26@gmail.com>
heloiselui added a commit to heloiselui/carbon that referenced this pull request Jun 5, 2026
…22366)

* feat(pictograms): new Pictograms June 2026

Submitting 14 new pictograms from June 2026 and updated categories.
Updated master file. All additions and updates approved by BXD.
Addressing issues carbon-design-system#319, carbon-design-system#321, carbon-design-system#324 and carbon-design-system#325 in brand/pictograms.

### Changelog

**New**

`Cities`
- [x] chennai.svg
- [x] denver.svg
- [x] frankfurt.svg
- [x] los-angeles.svg
- [x] miami.svg
- [x] oslo.svg
- [x] perth.svg
- [x] san-jose.svg
- [x] taipei.svg

`Design and development`
- [x] technology-zone--finger.svg

`Electronics`
- [x] laptop.svg

`Lifestyle`
- [x] lotus--flower.svg

`Workplace`
- [x] men--showers.svg
- [x] women--showers.svg

**Updated**

`Lifestyle`
- half-note.svg
- hard--ice--cream.svg
  Updated alphabetical order in categories.yml

* Update packages/pictograms/pictograms.yml

Resolved two instances of `men--showers` in pictograms.yml

Co-authored-by: Mahmoud <132728978+maradwan26@users.noreply.github.com>

* chore: update snapshots

* feat(pictograms): new Pictograms June 2026 (2)

Submitting 1 new pictogram from June 2026 and updated categories. Updated master file. All additions and updates approved by BXD. Addressing issue [carbon-design-system#322](https://github.ibm.com/brand/Pictograms/issues/322) in brand/pictograms.

### Changelog

**New**

`Cities`
- [x] ibm--atx-office.svg

* chore: update snapshots

---------

Co-authored-by: Mahmoud <132728978+maradwan26@users.noreply.github.com>
Co-authored-by: Mahmoud <maradwan26@gmail.com>
Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>
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.

4 participants