Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

WIP: Spotlight 3.0#11

Open
echappen wants to merge 41 commits intomainfrom
spotlight-3.0
Open

WIP: Spotlight 3.0#11
echappen wants to merge 41 commits intomainfrom
spotlight-3.0

Conversation

@echappen
Copy link
Copy Markdown

@echappen echappen commented Nov 5, 2020

No description provided.

18F/site-scanning#788
- Adds Redux for global state management
- Available Fields and Selected Fields components pull data from redux state
- Available Fields components add fields to redux state
- Selected Field buttons remove fields from redux state

- Uses React Testing Library with a custom Redux wrapper to unit test new components
- Adds Unit testing for each redux reducer
Add basic UI interactivity for field selection
I went with URLSearchParams over a custom package like query-string because it's a built-in, and with a polyfill it can support IE11.

More info on URLSearchParams
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams

Using this polyfill for IE:
https://www.npmjs.com/package/url-search-params-polyfill
This allows users to go to a url with pre-set fields
This uses the built-in URLSearchParams interface for parsing:
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
When field is selected and it's filterable. the appropriate filter will appear underneath the checkbox

Pending: passing Unit tests for UI components
Since filter fields are hidden until field is selected, user should know which fields can be filtered up-front.
places icon of filter next to filterable field checkbox labels
- Loading State has progress bar
- Success State has message, download button, and share button
- Error State has message
Note: non-funtional (UI-only)
Copy link
Copy Markdown

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

- Reduce number of available fields shown
- Add basic instructions
- Switch main action from Build Report to Copy Url
…ionality

Since the api will return all fields regardless of selection, there's no more need to select which fields you want to be present

- also add initial buttons for sharing query
- keep url params in sync with user filters, so url is always sharable
- fix bugs with available and selected fields not syncing
- minor style updates / remove all the big buttons
also removes share this button
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant