Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Fixes Issue #216: Encourage individual icon component usage by removing Icon/index.js #395

Closed
wants to merge 2 commits into from

Conversation

souviknsl07
Copy link

Description

As suggested in the issue, remove the Icon/index.js file to prevent engineers from importing and restructuring, also made the file structure such that -

//we end up with this:
import CheckmarkIcon from '@bufferapp/ui/Icons/Checkmark';
// instead of this
import CheckmarkIcon from '@bufferapp/ui/Icon/Icons/Checkmark';
// or this
import { Checkmark } from '@bufferapp/ui/Icons';

Due to this, had to change the imports for the icons in many other files and pathToIconComponents in scripts/generateIconComponents.js that's why the no. of files changed in this PR is huge, but it was a necessary change.

Motivation and Context

Fixes the Issue #216

Screenshots (if appropriate):

Screenshot (47)

Screenshot (48)
Screenshot (49)
Screenshot (50)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style and guidelines of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated the CHANGELOG document.
  • I have added tests to cover my changes.
  • I have performed a self-review of my own code
  • I have tested my changes/additions in the latest Chrome, Firefox, and Safari.
  • I have commented my code, particularly in hard-to-understand areas
  • All new and existing tests passed.
  • I have performed the accessibility audit of my UI changes according to the accessibility doc.
  • [Buffer Engineers] Someone from the Design team reviewed and approved my changes
  • [Buffer Engineers] I have notified the BDS team of my changes in the #proj-design-system Slack channel

@djfarrelly @gmzjuliana @tomredman @msanroman

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants