jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customization and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
130 stars 90 forks source link

Component documentation feedback #2265

Open bhoppers2008 opened 1 year ago

bhoppers2008 commented 1 year ago

A place to capture feedback on the docs template or the site page itself. Where are the challenges? Is there anything missing? Is it difficult to find a place for content you want to add? Etc...

bhoppers2008 commented 1 year ago
el-dav commented 1 year ago

Note the displayName issue (number 7) seems to be due to the components using arrow functions rather than named functions, so we should create a ticket to go though and update all components to use named functions. Updating FlowLayout to the following fixed that component for me:

export const FlowLayout: FlowLayoutComponent = forwardRef(function FlowLayout<
  T extends ElementType = "div"
>({ children, ...rest }: FlowLayoutProps<T>, ref?: PolymorphicRef<T>) {
  return (
    <FlexLayout direction="row" ref={ref} wrap {...rest}>
      {children}
    </FlexLayout>
  );
});

from

export const FlowLayout: FlowLayoutComponent = forwardRef(
  <T extends ElementType = "div">(
    { children, ...rest }: FlowLayoutProps<T>,
    ref?: PolymorphicRef<T>
  ) => {
    return (
      <FlexLayout direction="row" ref={ref} wrap {...rest}>
        {children}
      </FlexLayout>
    );
  }
);
james-nash commented 1 year ago
  1. Clicking on the chevron in the side nav should only expand/collapse the item, not open the page at the same time.

I believe this'll be fixed when we replace the current vertical nav component (which comes from Mosaic) with our own, based on the NavigationItem component.

Not sure there's much point trying to "fix" this in the Mosaic component now, given that we're due to replace it anyway.

james-nash commented 1 year ago

FYI, I've opened an issue to note some additional functionality for the LivePreview component (the thing that displays our component examples) that has been discussed in the past but never actually written down: #2348