Giter Club home page Giter Club logo

data-catalog-components's People

Contributors

alexiscott avatar brdunfield avatar brentonkelly1982 avatar dependabot[bot] avatar dgading avatar dharizza avatar fmizzell avatar janette avatar kevingilbert100 avatar mcmcphillips avatar thierrydallacroce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-catalog-components's Issues

ERROR in ./stories/search.stories.jsx Module not found: Error: Can't resolve '../src/components/InputLarge' in '~/Projects/data-catalog-components/stories'

env:

$ npm --version
6.14.7
$ node --version
v12.18.3

Hi

Wanted to check out your package, I cloned your repo and ran:

npm i --save
npm run storybook

but can't run storybook, get this error:

ERROR in ./stories/search.stories.jsx
Module not found: Error: Can't resolve '../src/components/InputLarge' in '/home/avery/Projects/data-catalog-components/stories'
 @ ./stories/search.stories.jsx 12:0-54 56:42-52
 @ ./stories sync .stories.jsx$
 @ ./.storybook/config.js
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true&quiet=true
Child HtmlWebpackCompiler:
                          Asset      Size               Chunks  Chunk Names
    __child-HtmlWebpackPlugin_0  6.34 KiB  HtmlWebpackPlugin_0  HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    [./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core/dist/server/templates/index.ejs] 2.13 KiB {HtmlWebpackPlugin_0} [built]

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

Any recommendations?
Thanks

Two scss folders

When adding the new scss files for distribution with the components, I accidentally introduced a second folder of scss files. Since this is no longer a theme, we should remove the theme folder and integrate the files in there with the styles folder. Updating any index.scss files as needed.

USWDS menu navigation

User Story

As a user I want to be able to easily navigate the site via a menu
As a client I would like to be able to change the color of the menu bar

Acceptance Criteria

This work involves adding a component which can be used for the main navigation. It will allow
users should be able to browse anv visit menu items. It will need to:

  • Allow for both top level menus and submenus
  • On mobile resolutions, work as a mobile menu which opens/ closes via a clickable item (Also keyboard) and presents a stacked list of mobile elements.
  • Be accessible. Include Aria markup and be easy to navigate through to all of the menu items just with a keyboard.
  • Be custom color themable.

##Estimate: 1 day

Dataset stories are broken

ERROR in ./stories/dataset.stories.jsx
Module not found: Error: Can't resolve '../src/services/resource/resource_tools' in '/home/fmizzell/Workspace/data-catalog-components/stories'
@ ./stories/dataset.stories.jsx 20:0-75 212:42-58
@ ./stories sync .stories.jsx$
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true&quiet=true

Clicking the dataset menu link does not clear the search filters

Hello, I have seen a problem, when selecting a theme it takes me to the datasets related to this theme, but when clicking on the themes button in the top navigation bar, it does not "clean the theme filter" the url if it changes, but the same front is kept.

  1. select the topic and the url path is: https://demo.getdkan.org/search?theme=Transportation

image

  1. inside the theme the url is https://demo.getdkan.org/search/?theme=Transportation and the datasets are filtered
    image

  2. when click the datasets button the url change but kept the filter dataset: https://demo.getdkan.org/search/

image

USWDS navbar component

Add a navbar component to the rest of the components. It will take
navLinks: a set of default links pulled from a JSON file.

User Story:

Acceptance criteria:

Estimate:

Note: We need a frontender full time to be able to work on USWDS work so until that happens this will be on hold

Create custom hooks for resource component

Extract the hooks and functions from resource component into their own file. This will allow developers to create downstream resources while maintaining the logic upstream.

Data table adjustments

I know we are waiting for UX team results but just jotting down some thoughts

  • Show 'no result found' message rather than lose access to the table.
  • option for horizontal scroll at the top
  • keep row data from wrapping by adding ... when it overruns the column width
  • option to freeze header row
  • restore the 'view in full screen modal' button
  • zebra striping does not carry through when scrolling to the right

DataTableDensity

Allow users to distinguish which selection of the DataTableDensity component is currently active.

  • Allow users to pass a prop for 'active' to DataTableDensity component which can be used to match against the icon text to add an additional class 'active' in the case of a match.

Clean up Organization component

The Organization component can be the first text for the new 2.0.0 update.

  • Change component to arrow function
  • Pass props in instead of destructuring a single props prop
  • remove hard coded Organization Image alt name prop
  • Make search url path a prop, some sites may not use /search for dataset searches
  • all classNames are now props and their default is based on USWDS (maybe cards?)
  • Link alt text is not hardcoded
  • Prop types all defined and each has a commented line above it explaining it's purpose.
  • Complete or almost complete test coverage for the component
  • Tests include jest axe to have no violations test.
  • Docz file updated to document the component to explain it's usage

The prop type comments should look like

/**
   * This is a pretty good description for this prop.
   */

This will result appear in the Docz file for this component, see https://www.docz.site/docs/built-in-components for more examples.

Replace current build process with Create React App and Rollup JS

Our current build process and babel setup is very fragile. Swapping to create react app and using something like Rollup js will give us more time to focus on the components instead of build tools. Also most things that are built to work with Create React App should now work out of the box with our tool set.

2.x Hero Component

The Hero component should be able to pass a search param to the dataset search page. It should be able to take a custom text input and button, along with props for each of the paths and search filters.

Include a class object to style with a different design system.

  • Title
  • Description
  • search url
  • search key
  • Textfield
  • Submit

Option to freeze header row on datatables

When scrolling down a data table the header should stick to the top of the page? Another option would maybe to have an option to contain the data table to the page with overflow x and y, then you could scroll in the table div itself.

Var change on pageSize -> page-size

Search page: When changing the amount of search results from 10 to 25 or 50 or even 100 (at the bottom of the page), always lists 10 search results per page

Initial USWDS Button component

We use buttons in many places in the data catalogs. We should get a React component that uses the USWDS styles and classes: https://designsystem.digital.gov/components/button/

It should take props for:

  • Variant [default, secondary, accent, accent, warm, base, outline, unstyled]
  • Disabled
  • inverse bool
  • big bool
  • children (the button should take children so anything can be passed in from text to images)

Have documented props, default props, unit tests, and jest test.

Search Facets track View More and View Less clicks

User Story

Allow users to track events associated with the 'View X more' and 'View Less' buttons associated with the SearchFacets.

Acceptance Criteria

  • The SearchFacets component can receives an additional conditional two props that will be function definitions: 'onMore' and 'onLess.
  • The SearchFacets component passes these two props conditionally to the ShowMoreContainer.
  • When the ShowMore button is clicked, if the prop for 'onMore' is supplied, invoke the 'onMore' function if the button text reads 'Show X More'
  • When the ShowLess button is clicked, if the prop for 'onLess' is supplied, invoke the 'onLess' function if the button text reads 'Show Less'

Datastore requests hard to customize

The datastore.js is one of the oldest parts of our component library. It has been updated a few times, but still has a lot of legacy code that isn't used. I'm proposing dropping the class structure and moving to something more akin to just a JS object structure. http://aaditmshah.github.io/why-prototypal-inheritance-matters/

This structure so far has seemed useful on other builds as works similar to how we currently use the class but is much easier to extend or change to meet the requirements on a particular build. With this the create method can always be overwritten to add what is needed for the particular component and it's easy to store extra information like fields or custom datastore requests. As the DKAN datastore api continues to grow we should be able to easily update the components datastore without breaking older builds as much.

I'll try to explain more how it works in the PR where code will be easier to see.

Audit changes that would go into 1.x

In order to get a sense of what are the new changes that would be included in 1.8x of the frontend, do an audit of commits.

Acceptance criteria:

  • A checklist that can be used for each of our clients

Estimate: 1 hour

Allow Individual SearchFacet components to be imported

Currently SearchFacets component is a list component that renders individual SearchFacet components.

In order to allow for skeleton loading components to load independent of the SearchFacets list render, allow users to import individually import SearchFacet components for conditional rendering.

Replace Docz with Storybook

Storybook has been updated to include MDX for documentation. The reason we left for Docz was the MDX feature, but also lost all the other cool things with Storybook. Now we can have both and it's a good time to make the switch.

  • Can build storybook locally
  • Has example of MDX Story

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.