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

Feature/fds 116 - Set up onAction function for feature parity with Table #141

Merged
merged 9 commits into from
Feb 12, 2021

Conversation

lordpixel
Copy link
Contributor

Hi team,

This adds actions to Form, here's what was done:

  • create Form-specific ActionEdit component
  • create Table-specific ActionEdit component
  • add actions support to From
  • update Table to use its own ActionEdit
  • update any export/import, test, fixture as required

Unit tests

Unit tests will be added as part of FDS-30.

ActionBar layout

As you may notice, the buttons appear at the left side. We need to talk about the layout we are going to support as well as the AST to declare it.

New Component Checklist

  • Includes unit tests for ALL required FDS use cases
  • Does not mute any top level API props in React
  • Includes an explanation for any changes to Jest snapshots (should be a PR tag automatically added if this happens)
  • Component uses React.forwardRef() when a single DOM node is returned, AND it makes React-sense to access that DOM node

@vercel
Copy link

vercel bot commented Feb 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/espressive/cascara/gf21cj13b
✅ Preview: https://cascara-git-feature-fds-116.espressive1.vercel.app

@lordpixel
Copy link
Contributor Author

Vercel build is failing because now Table and Form import their own ActionEdit component, but such component is not available in MDX scope.

My guess is that we should only import Table's ActionEdit and leave Form's out.

@brianespinosa
Copy link
Contributor

Vercel build is failing because now Table and Form import their own ActionEdit component, but such component is not available in MDX scope.

Interesting. Let me take a look at this. Maybe we will need to import and export those directly from the components they are used in. For instance in Form.js:

import ActionEdit from './modules/ActionEdit`;

// component stuff

export {ActionEdit}

export default Form

Copy link
Contributor

@brianespinosa brianespinosa left a comment

Choose a reason for hiding this comment

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

@lordpixel we have some conflicts here. Please resolve those and then @ me so I can come back and review and test. I think we can get this in today... and possibly get the docs ready to go to also include this in the next alpha. I think this can ship as part of a new minor version 0.3.0. 🥳

@brianespinosa brianespinosa merged commit c1fc1f3 into feature/FDS-15-form-P1 Feb 12, 2021
@brianespinosa brianespinosa deleted the feature/FDS-116 branch February 12, 2021 22:00
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.

2 participants