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(createScanDialog): issues/1 scan creation options
 #25

Merged
merged 3 commits into from
Mar 26, 2019

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Mar 21, 2019

What's included

  • feat(createScanDialog): issues/1 scan creation options

    • build, react framework updates
    • styles, forms clean up, touchspin form adjustments
    • apiConstants, organize, submit scanName, scanSources added
    • scanActions, duplicate action addStartScan, associated constant
    • scansEditReducer, link scanAction, addStartScan, hide show modal type
    • sources view, move lifecycle concepts to sourcesReducer state
    • sourcesListItem, restructure and testing updates
    • redux actions, constants, reducers clean up and testing updates
    • touchspin, component added
    • createScanDialog, added scan creation options
  • fix(scansEditReducers): improve error messages
    • scansEditReducer, submit error messaging
    • helpers, getMessages expanded

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test

Interactive unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test:dev

Code

  1. Make sure Docker is running
  2. update the NPM packages with $ yarn
  3. $ yarn start:stage to start up a local running instance of the API against development code

Example

Mar-21-2019 19-09-18-640

Updates issue/story

#1 #18

@codecov-io
Copy link

codecov-io commented Mar 21, 2019

Codecov Report

Merging #25 into master will increase coverage by 2.99%.
The diff coverage is 58.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   58.94%   61.93%   +2.99%     
==========================================
  Files          83       85       +2     
  Lines        1929     2002      +73     
  Branches      316      324       +8     
==========================================
+ Hits         1137     1240     +103     
+ Misses        665      640      -25     
+ Partials      127      122       -5
Impacted Files Coverage Δ
src/components/addSourceWizard/addSourceWizard.js 33.33% <ø> (ø) ⬆️
src/redux/reducers/scansReducer.js 100% <ø> (ø) ⬆️
src/redux/reducers/sourcesReducer.js 100% <ø> (+8.33%) ⬆️
src/redux/actions/scansActions.js 100% <100%> (+10.71%) ⬆️
src/constants/apiConstants.js 100% <100%> (ø) ⬆️
src/redux/constants/sourcesConstants.js 100% <100%> (ø) ⬆️
src/redux/constants/scansConstants.js 100% <100%> (ø) ⬆️
src/components/sources/sourceListItem.js 44.31% <28%> (+0.64%) ⬆️
...rc/components/createScanDialog/createScanDialog.js 41.37% <36%> (+16.85%) ⬆️
src/components/touchspin/touchspin.js 59.57% <59.57%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2107682...a33d8eb. Read the comment docs.

@cdcabrera cdcabrera changed the title Issues/1 feat(createScanDialog): issues/1 scan creation options
 Mar 21, 2019
Copy link

@bclarhk bclarhk left a comment

Choose a reason for hiding this comment

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

as long as the results are as expected, this looks good

Copy link

@jeff-phillips-18 jeff-phillips-18 left a comment

Choose a reason for hiding this comment

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

LGTM. One small, optional, suggestion.
I see we are losing the ability to maintain expand state when navigating :(


TouchSpin.defaultProps = {
className: '',
labelMax: <Icon type="fa" name="plus" />,

Choose a reason for hiding this comment

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

might consider an sr-only span to help with accessibility

Copy link
Member Author

@cdcabrera cdcabrera Mar 25, 2019

Choose a reason for hiding this comment

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

updated: so it looks like we were already hiding the buttons for min and max and just exposing the input field with a aria-hidden. The field can still be wrapped with a label, so thinking we're safe, least for pf3 accessibility.

edit: admittedly this does bypass the accessibility problem all together, which isn't great

What was broken for sure was the ability to be notified when the field validation updated inside the dialog. So went back and added the aria-live attributes to the two most recent parts we updated... the Add Source Wizard, and the Scans dialog covered by this PR

Copy link
Member Author

@cdcabrera cdcabrera Mar 25, 2019

Choose a reason for hiding this comment

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

... and yeahhhhhh its a little sad on the expanded bits, on the upside removing the subsequent ajax calls the expanded state was forced to handle did improve overall load time

* build, react framework updates
* styles, forms clean up, touchspin form adjustments
* apiConstants, organize, submit scanName, scanSources added
* scanActions, duplicate action addStartScan, associated constant
* scansEditReducer, link scanAction, addStartScan, hide show modal type
* sources view, move lifecycle concepts to sourcesReducer state
* sourcesListItem, restructure and testing updates
* redux actions, constants, reducers clean up and testing updates
* touchspin, component added
* createScanDialog, added scan creation options
* scansEditReducer, submit error messaging
* helpers, getMessages expanded
@cdcabrera cdcabrera merged commit feaa5ef into quipucords:master Mar 26, 2019
cdcabrera added a commit to cdcabrera/quipucords-ui that referenced this pull request Mar 28, 2019
* build, react framework updates
* styles, forms clean up, touchspin form adjustments
* helpers, getMessages expanded
* apiConstants, organize, submit scanName, scanSources added
* scanActions, duplicate action addStartScan, associated constant
* scansEditReducer, scanAction, addStartScan, display modal, errors
* sources view, move lifecycle concepts to sourcesReducer state
* sourcesListItem, restructure and testing updates
* redux actions, constants, reducers clean up and testing updates
* touchspin, component added
* createScanDialog, added scan creation options
cdcabrera added a commit to cdcabrera/quipucords-ui that referenced this pull request Mar 28, 2019
* build, react framework updates
* styles, forms clean up, touchspin form adjustments
* helpers, getMessages expanded
* apiConstants, organize, submit scanName, scanSources added
* scanActions, duplicate action addStartScan, associated constant
* scansEditReducer, scanAction, addStartScan, display modal, errors
* sources view, move lifecycle concepts to sourcesReducer state
* sourcesListItem, restructure and testing updates
* redux actions, constants, reducers clean up and testing updates
* touchspin, component added
* createScanDialog, added scan creation options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants