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

feat(Schema): create a schema editor #392

Merged
merged 8 commits into from
Jan 17, 2020
Merged

feat(Schema): create a schema editor #392

merged 8 commits into from
Jan 17, 2020

Commits on Jan 15, 2020

  1. feat(components): add components that build to create TypePicker

    added components:
    - overlay/Overlay: used as a pop over, will call `onCancel` if you click outside fo the div, or click the 'x'. The `navigation` prop is optional. Any `children` will overflow-y scroll.
    - item/DataType.tsx: defines the `DataTypes` type. Wraps the type name, description, and icon. `type` and `description`, are defined and passed down. May want to refactor to keep description and type defined here, and just use the type to determine all content.
    - nav/TabPicker: has size options 'sm' and 'md', and color options 'light' and 'dark'
    - overlay/TypePickerOverlay: a version of `Overlay` that lists the DataTypes and passes through the `navigation` component. `typesAndDescriptions` are defined here.
    - structure/ColumnType: the component used to show the column type with its icon. Is not 'clickable' if there is no 'onClick' func passed down. I a column has more than one type, it will indicate 'multi'
    - structure/TypePicker: takes all these components and creates a TypePicker. Click on the columnType to get a TypePickerOverlay popup. Choose between single or multi mode. The chosen type is kept in the hidden input named for the column (`${column-name}-type`)
    
    This commit also created scss files based on the folder structure:
    - chrome
    - item
    - nav
    - overlay
    - structure
    - type
    
    It also adds a story for each component under the `structure` tab
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    9cd6592 View commit details
    Browse the repository at this point in the history
  2. feat(DynamicEditField): in place input field w/ validation

    modeled after the `DatasetReference` component
    Ran into a bizarre issue where the `commitEdit` function was only ever pulling from the initial state values, rather then the current state. Had to do a weird hack where I used the `prev` value in the setState functions to get the actual state...
    
    Added a new story for `Form` items
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    fb144fe View commit details
    Browse the repository at this point in the history
  3. feat(SchemaItem): row that contains editable schema info

    - adjusts ColumnType, TypePicker, and DynamicEditField to have `expanded` view
    - adds up, down, left, right carets to `Icon`
    - creates `SchemaItem` that expands and retracts
    - known bug, DynamicEditField doesn't expand fully at first when you expand SchemaItem
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    6f60fa0 View commit details
    Browse the repository at this point in the history
  4. feat(Schema): add schema, adjust DynamicEditField to use div

    DynamicEditField uses editable `div` rather then `input`
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    1cc8398 View commit details
    Browse the repository at this point in the history
  5. refactor(DynamicEditField): adjust where we pull value now that we ar…

    …e no longer using `input`
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    2194d90 View commit details
    Browse the repository at this point in the history
  6. refactor(Schema): add non-editable state and bring Schema into app

    `Schema` is now apart of the `Structure` component! We have schema editing in app :)
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    870a479 View commit details
    Browse the repository at this point in the history
  7. refactor(Schema): handle strange types

    make adjustments to the way we handle unknown types and 'any'
    ramfox committed Jan 15, 2020
    Configuration menu
    Copy the full SHA
    2c048a1 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2020

  1. refactor(structure): adjust inputs and function signatures

    internally we have decided to pass all the 'stuff' that a component needs to display as the prop `data`, and that each component should handle their own events
    this pr required refactoring to match with this paradigm
    ramfox committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    1ba5f59 View commit details
    Browse the repository at this point in the history