-
Notifications
You must be signed in to change notification settings - Fork 1
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
Made options & value as required for the TabBar component #461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! There are a few more subtle changes required here as a result of this change. Let me know if you have any questions or want to pair!
- Documentation should be updated to no longer mark options and values as optional (https://share.getcloudapp.com/Z4uqZ1k4) (the
[]
brackets denote optional) - A migration guide should be created to help people understand what they need to do to upgrade from
5.0.0
to6.0.0
(migration guide example) - Since the values are required, you no longer should have default props declared (https://share.getcloudapp.com/bLu0Jxwm)
- There is no longer the concept of "falling back" to the value of the first option, so the concept of activeValue should be removed from the component
- Tests and StoryBook will need to be updated to account for these changes (e.g.,
test('TabBar mounts with the first tab active by default', () => {
@AngelMDev Do you have any bandwidth to make these adjustments? |
Sorry, this has been off my radar for a really long time! Yes I can address this. On the upside, I now have a better idea of what I'm doing hah. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Nice work!
* Add `hideLabel` prop (#227) * add hideLabel prop, story * update showLabel logic, add new story * remove import * Version bump: 3.7.0 * add input label test, fix range input test * lint * change range label prop name * Add `Select` placeholder option by default (#256) * add default placeholder * Version bump: 3.12.0 * Lint rolling * Mapping aria-disabled instead of disabled (#337) * a11y group legends (#384) * Default label component to a legend for checkbox group * Default label component to a legend for radio group * Remove custom style prop on button (#408) * Remove custom style prop on button * Remove disabled button test * Cleanup * Some formatting * Priority -> variant * Add migration guide * Naming * Consolidate examples * Move deprecated migration guide to v6 milestone * Fix merge conflict * Take prop change name one level of abstraction further to accommodate changes in future * Modify File Input to accept multiple files (#380) * Initial refactor * Replace remove button with customizable component that accepts handler * POC for workaround with files failing to load (mostly a upstream cloudinary issue) * Refactor to a controlled file input (#388) * Initial proof-of-concept * Clean up logic and add dev hints via prop types * Always return an array * Read files synchronously to avoid overwrites * Modify markup to allow for focus styling * Code review feedback * Make cloudinary accept a file input and set the response appropriately * Extract helpers into shared folder * Override read files utility and clean up based on code review * filter invalid props from getting passed to error label (incl. label = false) * Return files on cloudinary read * Code clean-up * Update CloudinaryFileInput docs * Update FileInput docs * Bump size limit * Bump to milestone * Fix failing specs * Remove duplicate import * Fix merge conflicts * Add specs for multiple file input * Add coverage for inverse scenario * Add missing tests for remove functionality * Refactor FileInput using hooks * Use hook import directly * Safely mock global object in an isolated way * Wrap component in act to ensure state updates have settled * Add tests for error capture * Cover ternary branching conditions * Update migration guide * Code review feedback * Add new test * Manually updating docs * Refactor to always store values in an array * Update migration guide based on input value change * Update prop types * Do not change initial value if not an array (it will flag form as dirty) * Add thumbnail story * Code review feedback * Globally replace redux-forms * Reference array instead of single file * Add className to spinner component (#493) * change id to classname on spinner component * revert inadvertnet commit * add className to spinner component * passing tests and update version * add notes on the migration guide file * adding feedback changes * fix migration guide * update language in migration guide * additional feedback comments * update default prop * add destructuring to props * Small tweaks * Add missing period Co-authored-by: Conor Hawes <[email protected]> * Made options & value as required for the TabBar component (#461) * Made options & value as required for the TabBar component * bump version * update docs, storybook, tests. remove unneeded activeValue logic * Small documentation tweaks * Update docs and travis * Address linting errors * Address unrelated lint error Co-authored-by: Conor <[email protected]> * Issue #347 : Add remove button to default file input previews (#526) * show clear button for single file upload * formatting * tests for clear file input btn * make remove button for single file consistent with remove button for multiple files * update docs * run yarn docs manually * Add small note to migration guide Co-authored-by: Conor Hawes <[email protected]> * 524 remove setter link (#528) * Remove SetterLink * Update docs * Modal close refactor (#525) * Prevent all methods of closure * Update migration guide * Make isOpen prop less confusing * Manually update docs * Pass redux flash message to dismiss fn (#522) * Add ref forwarding to button (#542) * Add button ref note to migration guide * Fix tests and prop types (#553) * Hotfix * Be more specific * Fix select test warnings * Fix textarea test warnings * Fix file input test warnings * Dedupe yarn.lock file to help resolve issues * allow cell to take custom properties like aria and data-cy per cell b… (#503) * allow cell to take custom properties like aria and data-cy per cell by column * versioning to 5.4.3 * add filterInvalidProps to DefaultCellComponent render * add back space * add sortable-table.test.js test for addition; * remove custom class for valid dom prop * add test for invalid DOM props on column * Tweak formatting * Remove unnecessary attributes Co-authored-by: Conor Hawes <[email protected]> * Do not overwrite default modal classes (#554) * Add functionality * Add specs * Add story * Update migration guide * Tweak migration guide * render caption in table if passed in as a prop (#540) * render caption if passed in as a prop * remove semicolons i missed * migration guide * Render caption as table's first descendant * Add story * Fix typo * Rename file to match convention * Fix more typos * Add caption tests Co-authored-by: Conor Hawes <[email protected]> * Add GitHub issue templates (#555) * Add issue templates * Update FEATURE_REQUEST.md * Add support for additional undocumented props (#556) * Add support for additional undocumented props * Update docs and support callback ref as a prop * Actually update docs * Add disabled class to outer field wrapper (#557) * Add disabled class at top level * Update spec * Bug/react modal default (#559) * Switch selector * Apply aria-hidden on the browser * Update documentation * Fix prop documentation 😳 * Upgrade DateInput's react-datepicker dependency (#558) * Add missing test case * Upgrade to v2 * Upgrade to v3 * Update to v4 * Tweak formatting * Update migration guide * Update docs * Use calendar ref * Simplify implementation * Generate docs after merge * Write a better comment * Extend radio checkbox prop types (#563) * Do not use input prop types for a component that is not an input * Isolate components to allow for checkbox and radio groups to receive bools * Reuse type * Fix tabbar prop type issue * Remove unused import * Update docs * Upgrade to react-switch to v7 (#564) * Update package independently (#565) * Upgrade to react 17 (#569) * Remove lp hoc (#562) * Remove unused sortable imports * Remove toggle usage from most components * Update input-label * Remove unused hoc * Remove toggle and outside click hocs * Port over most files from lp-hoc's cloudinary uploader * Bring over cloudinary uploader and tweak tests * Clean up util usage * Use cloudinary hoc mock in file input test * Officially remove lp-hoc from library * Suppress unnecessary errors shown in modal * Lint * Add back export for cloudinary uploader util * Update migration guide * Fix heading formatting * Update docs * Always set a boolean value * Add docs about breaking change * Update docs after latest merge * Be better at writing tests * Coerce using Boolean constructor * Allow specification of group's input props (#571) * Fix watch infinite loop * Avoid passing down class name and allow localized input prop overrides * Update docs * Add stories * Add examples Co-authored-by: Rachel Killackey <[email protected]> Co-authored-by: David Pickart <[email protected]> Co-authored-by: George Lee <[email protected]> Co-authored-by: Angel Medina <[email protected]> Co-authored-by: Nicole Dow <[email protected]> Co-authored-by: Alexander Jin <[email protected]> Co-authored-by: Ji H. Park <[email protected]>
Addresses: #419.
This one I admit is a bit outside the area of my expertise, but I think these changes do the trick, assuming chaining
isRequired
works as I expect it to do. I guess one question that I have is if the linter is supposed to catch these, or if an error is supposed to print in dev console? I certainly saw none of these for both of the params, while other components do show a linter error. Lmk if I needed to do anything else here for that to show.Bumping to a new major version.