Skip to content

Conversation

@ryanseddon
Copy link
Contributor

@ryanseddon ryanseddon commented Oct 24, 2018

Description

The theming docs are currently a little light on detail when it comes to the naming used to target the components you wish to write theme overrides for.

Detail

This adds a new component called <CIDTable /> that renders a webpack global called COMPONENT_IDS.

On doc site build it scans all the js files for component_ids and injects it as a webpack global that is then consumed by <CIDTable /> to render them out.

This will make it automagically update anytime any new ids and added and/or changed.

screen shot 2018-10-26 at 4 57 44 pm

Checklist

  • 👌 design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 💅 view component styling is based on a Garden CSS
    component
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 💂‍♂️ includes new unit and snapshot tests
  • 📒 any new files are included in the packages src/index.js export
  • 📝 tested in Chrome, Firefox, Safari, Edge, and IE11

@coveralls
Copy link

coveralls commented Oct 24, 2018

Coverage Status

Coverage remained the same at 94.792% when pulling 70be94c on ryan/theming_doc_improvements into 74f2409 on master.

@ryanseddon ryanseddon force-pushed the ryan/theming_doc_improvements branch from dca0c60 to d9baaee Compare October 24, 2018 03:37
@austingreendev austingreendev self-requested a review October 24, 2018 16:16
Copy link
Contributor

@austingreendev austingreendev left a comment

Choose a reason for hiding this comment

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

This is going to be very helpful! I may be crazy, but is it possible to extract this logic/table creation into the page build process.

Would the following be possible?

  1. Add the file parsing script output as a webpack global (just a structured array)
  2. Create a React example in the MD file that uses the provided global to spit out one of our react-tables?

Otherwise I could see us forgetting to keep this section up-to-date with every addition/retraction.

@jzempel
Copy link
Member

jzempel commented Oct 25, 2018

If not added to the build, as Austin suggests, then at a minimum it should be added to the TODO comment section in https://github.com/zendeskgarden/react-components/blob/master/packages/.template/README.md (although this is not the ideal spot to catch all new COMPONENT_ID additions).

@ryanseddon ryanseddon changed the title [WIP] feat(docs): Improve theming docs feat(docs): Improve theming docs Oct 25, 2018
@ryanseddon ryanseddon force-pushed the ryan/theming_doc_improvements branch from 8631a43 to caf7ab5 Compare October 26, 2018 05:49
@ryanseddon ryanseddon force-pushed the ryan/theming_doc_improvements branch from caf7ab5 to 4220291 Compare October 26, 2018 05:52
Copy link
Contributor

@austingreendev austingreendev left a comment

Choose a reason for hiding this comment

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

LGTM pending @jzempel comment

@ryanseddon ryanseddon merged commit 7e57c47 into master Oct 29, 2018
@ryanseddon ryanseddon deleted the ryan/theming_doc_improvements branch October 29, 2018 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants