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

[WIP] 🧪 Experimental Table #718

Closed
wants to merge 51 commits into from
Closed

Conversation

matheusps
Copy link
Contributor

@matheusps matheusps commented Jul 11, 2019

What is the purpose of this pull request?

WIP

What problem is this solving?

Related issue #716

How should this be manually tested?

See in action on this PR

You can also clone the repository, start the styleguidist using cd styleguide && yarn install && yarn start and navigate to Experimental/Table section.

Screenshots or example usage

Let's suppose that you have a custom component called AwesomeComponent that should have a field with autocomplete.

The code would be something like:

import { Table, useAutocomplete } from 'vtex.styleguide'
import  AwesomeComponent from './'

function YourUseCase(props) {

  const shema = { ... }
  const items = { ... }

  const density = {
    buttonLabel: 'Line Density',
    lowOptionLabel: 'Low',
    mediumOptionLabel: 'Medium',
    highOptionLabel: 'High',
  }

 const fields = {
    label: 'Toggle Visible Fields',
    showAllLabel: 'Show All',
    hideAlllLabel: 'Hide All',
  }
  
  const inputSearch  = useAutocomplete(...)

  return (
    <Table schema={schema} items={items} toolbar={inputSearch, density, fields} />
  )
}

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@matheusps matheusps self-assigned this Jul 11, 2019
@matheusps matheusps changed the title Make table toolbar extensible 🛠 WIP 🛠 Make table toolbar extensible Jul 11, 2019
@matheusps matheusps changed the title 🛠 WIP 🛠 Make table toolbar extensible Make table toolbar extensible Jul 23, 2019
@matheusps matheusps marked this pull request as ready for review July 23, 2019 15:39
@matheusps matheusps requested a review from a team July 23, 2019 15:39
@analuizamtg analuizamtg requested a review from kevinch July 23, 2019 16:40
Copy link
Contributor

@kevinch kevinch left a comment

Choose a reason for hiding this comment

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

This behavior has to be discussed with the Styleguide/design team in order to move on.

react/components/Table/Toolbar/ButtonToolbar.js Outdated Show resolved Hide resolved
react/components/Table/Toolbar/InputToolbar.js Outdated Show resolved Hide resolved
@matheusps matheusps changed the title Make table toolbar extensible Toolbar Autocomplete Aug 1, 2019
@matheusps matheusps changed the title Toolbar Autocomplete [WIP] Toolbar Autocomplete Aug 1, 2019
@matheusps matheusps changed the title [WIP] Toolbar Autocomplete [WIP] 🧪 Experimental Table Aug 2, 2019
Copy link
Contributor

@tasgmaia tasgmaia left a comment

Choose a reason for hiding this comment

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

Just to be sure. There is any changes on the current experience pattern or it is just a refactor on to test a compound component?

@tasgmaia
Copy link
Contributor

tasgmaia commented Aug 9, 2019

@matheusps what about this PR?

@matheusps
Copy link
Contributor Author

@TasGuerciMaia I am closing it. I'll be working step-by-step (feature-like) with the first being this PR so that I can keep PR's smaller than the current one.

@matheusps matheusps closed this Aug 11, 2019
@matheusps matheusps deleted the feature/composable-table branch January 17, 2020 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants