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

Create project and feed tweaks #255

Merged
merged 7 commits into from
Dec 3, 2018

Conversation

landonreed
Copy link
Member

@landonreed landonreed commented Nov 15, 2018

A few tweaks for #41:

  • auto focus first field in form
  • use validator library to validate URL (which is already used in editor)
  • add keydown listener for ENTER (to trigger save)
  • show loading spinner after save to prevent form from emptying and looking like something went wrong

@codecov-io
Copy link

codecov-io commented Nov 16, 2018

Codecov Report

Merging #255 into create-project-and-feed will increase coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@                    Coverage Diff                     @@
##           create-project-and-feed    #255      +/-   ##
==========================================================
+ Coverage                     4.95%   4.98%   +0.02%     
==========================================================
  Files                          328     328              
  Lines                        15508   15419      -89     
  Branches                      4693    4654      -39     
==========================================================
  Hits                           768     768              
+ Misses                       12551   12488      -63     
+ Partials                      2189    2163      -26
Impacted Files Coverage Δ
lib/manager/components/CreateProject.js 0% <ø> (ø) ⬆️
lib/manager/components/FeedSourceSettings.js 0% <ø> (ø) ⬆️
lib/manager/components/ProjectViewer.js 0% <0%> (ø) ⬆️
lib/common/components/Loading.js 0% <0%> (ø) ⬆️
lib/manager/components/ProjectSettingsForm.js 0% <0%> (ø) ⬆️
lib/manager/components/CreateFeedSource.js 0% <0%> (ø) ⬆️
lib/common/components/SidebarNavItem.js 0% <0%> (ø) ⬆️
lib/manager/actions/user.js 0% <0%> (ø) ⬆️
lib/common/components/Sidebar.js 0% <0%> (ø) ⬆️
lib/common/user/Auth0Manager.js 0% <0%> (ø) ⬆️

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 74a2e11...b35b4fa. Read the comment docs.

Copy link

@evansiroky evansiroky left a comment

Choose a reason for hiding this comment

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

There ought to be a validation check after pressing enter and before saving a feed source or project. It'd probably be good to recalculate the form validation when enter is pressed and if everything looks good, continue with saving.

_handleKeyDown = (e: SyntheticKeyboardEvent<HTMLInputElement>) => {
switch( e.keyCode ) {
case 13: // ENTER
this._onSave()

Choose a reason for hiding this comment

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

There needs to be some kind of validation check done before calling _onSave. It's possible to create a feed source without a name with this change.

_handleKeyDown = (e: SyntheticKeyboardEvent<HTMLInputElement>) => {
switch( e.keyCode ) {
case 13: // ENTER
this._onSaveSettings()

Choose a reason for hiding this comment

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

There needs to be some kind of validation check done before calling _onSaveSettings. It's possible to create a project without a name with this change.

@evansiroky evansiroky assigned landonreed and unassigned evansiroky Nov 20, 2018
@landonreed
Copy link
Member Author

OK, @evansiroky, I made some changes that address the onSave issue. Let me know how it looks.

@landonreed landonreed assigned evansiroky and unassigned landonreed Nov 28, 2018
@landonreed landonreed merged commit 229262e into create-project-and-feed Dec 3, 2018
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.

3 participants