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

Misleading icon import documentation #5094

Closed
jmuzina opened this issue May 20, 2024 · 1 comment · Fixed by #5100
Closed

Misleading icon import documentation #5094

jmuzina opened this issue May 20, 2024 · 1 comment · Fixed by #5100
Labels
Bug 🐛 Documentation 📝 Documentation changes or updates

Comments

@jmuzina
Copy link
Member

jmuzina commented May 20, 2024

Describe the bug

The import section of the icons documentation suggests that users can specifically include directional chevrons and the information icon by name:

@include vf-p-icon-chevron-down;
@include vf-p-icon-chevron-up;
@include vf-p-icon-information;

However, Vanilla is not creating any mixins for specific directional chevrons. Rather, we create a single mixin vf-p-icon-chevron that declares classes for the directional chevrons. The information icon is included in the mixin vf-p-icon-info, not vf-p-icon-information.

Attempting to include these as directed by our documentation will lead to a build error as the mixins cannot be found.

To Reproduce

Steps to reproduce the behavior:

  1. Icons documentation imports section
  2. Observe the instructions to include the above mixins
  3. Verify that there is no mixin in the Vanilla codebase matching any of the above.

Expected behavior

The icons import documentation accurately reflects how to import the minimum set of SCSS required to show each icon.

Screenshots
image

Desktop (please complete the following information):

  • OS: PopOS 22.04
  • Browser: Firefox
  • Version: 125.0.2

Additional Context
The icons documentation is creating the import statements by looping through standard_icons in templates/docs/patterns/icons/index.md (which also controls which icons are displayed in the standard & dark theme icons sections).

Removing the instructions to import these nonexistent mixins would require slight changes around here to avoid creating import statements for specific mixins. Maybe it's easier to implement the mixins themselves?

Maybe we should create mixins for each direction, or remove the specific directional chevrons from the documentation and direct users to just include vf-p-icon-chevron.

@jmuzina jmuzina added Bug 🐛 Documentation 📝 Documentation changes or updates labels May 20, 2024
@jmuzina jmuzina changed the title Directional icon chevrons are not exported as mixins Misleading chevron icon import documentation May 20, 2024
@jmuzina jmuzina changed the title Misleading chevron icon import documentation Misleading icon import documentation May 23, 2024
@jmuzina
Copy link
Member Author

jmuzina commented May 23, 2024

Updated to note that the vf-p-icon-info mixin is improperly documented as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Documentation 📝 Documentation changes or updates
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant