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

fixed new room page form validation #7098

Merged
merged 32 commits into from
Feb 23, 2022
Merged

fixed new room page form validation #7098

merged 32 commits into from
Feb 23, 2022

Conversation

ABee-Tech
Copy link
Contributor

@ABee-Tech ABee-Tech commented Jan 9, 2022

Details

Explained over here: #6967 (comment)

Fixed Issues

$ #6967

Tests

  • Put empty room name
  • Existing room name check

QA Steps

  1. Open app
  2. Create Workspace
  3. Select "+" > New room
  4. Enter any name and delete
  5. Hit Create room with empty room name
  6. User will not be able to create room with blank room name

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Android

Proposal.-.1.mp4
Proposal.-.2.mp4

Screenshots after all changes

Web

testing-on-web4.mp4

Android

testing-on-android.mp4

@ABee-Tech ABee-Tech requested a review from a team as a code owner January 9, 2022 08:17
@MelvinBot MelvinBot requested review from marcaaron and parasharrajat and removed request for a team January 9, 2022 08:17
@ABee-Tech
Copy link
Contributor Author

I think we should create new statements for:
i. Please enter a room name.
i. Please select a workspace.
ii. Please select a visibility.

I need help on where to define these statements on src/languages/en.js.

@ABee-Tech
Copy link
Contributor Author

ABee-Tech commented Jan 9, 2022

@parasharrajat Thank you for the suggestions. I will update them. can you tell me why is Jest Unit Tests is failing on something called Decrypt OSBotify GPG Key?

@parasharrajat
Copy link
Member

That is an internal issue and soon be fixed.

@ABee-Tech
Copy link
Contributor Author

And what about translation of the sentence to Español language? @parasharrajat

@ABee-Tech
Copy link
Contributor Author

For translation to Español language I have left empty string on es.js file.

Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

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

Nice job so far! Left a few style reminders. Mostly looking good here.

@ABee-Tech
Copy link
Contributor Author

@parasharrajat @marcaaron I have done changes as per reviews. You can review the changes.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

looks good. only the translation part is remaining.

@ABee-Tech
Copy link
Contributor Author

I have changed select to choose and finally added es translations for those error statements. I think everything is fine now.

@marcaaron
Copy link
Contributor

Found a few more things to fix. Also there are conflicts that will need to be fixed before we can merge.

@ABee-Tech
Copy link
Contributor Author

@parasharrajat @marcaaron I have fixed all the review changes. Now, I think we should resolve conflicts first before merge. But, help me on resolving those conflicts.

@parasharrajat
Copy link
Member

@ABee-Tech Please merge Main into your branch and resolvee the conflicts if any. and let me know when this is ready.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Looks good. Please resolve the conflcits. thanks.

@ABee-Tech
Copy link
Contributor Author

@parasharrajat @marcaaron should we use RoomNameInput component used on line 203 of WorkspaceNewRoomPage.js or not?

@parasharrajat
Copy link
Member

The slack post didn't get much attention but it seems we can proceed with the changes.

@ABee-Tech
Copy link
Contributor Author

Okay then.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. I noticed some changed code in your PR. Please make sure that you don't break the fix #7661.

Please adjust the code so that 7661 still works on your changes. And It would be great if you can mark old comments resolved. Thanks.

Modify your screenshots to reflect both changes. new Room page and Room Settings page in the single video for each platform. You can leave Desktop and IOS, I will test that as you don't have access to it.

@ABee-Tech
Copy link
Contributor Author

ABee-Tech commented Feb 15, 2022

@parasharrajat Everything is fine. There is no issue prevailing like on the issue of the PR #7661. There is no need for change I think. That works fine. I will attach screenshots for Android and Web including that.

@ABee-Tech
Copy link
Contributor Author

ABee-Tech commented Feb 15, 2022

Ohh sorry. I checked on android. It was fine. But, on web the issue exists. I will adjust the code and then upload screenshots.

@ABee-Tech
Copy link
Contributor Author

@parasharrajat I have adjusted the code and tested on web and android. I have uploaded screenshots above.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Thanks, @ABee-Tech. One more small tweak.

image
Please tick all platforms.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

One change and we should be good.

@ABee-Tech
Copy link
Contributor Author

@parasharrajat I am having trouble running web version. Can we consider last screenshot just without growl message?

parasharrajat
parasharrajat previously approved these changes Feb 20, 2022
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the changes @ABee-Tech

cc: @marcaaron

🎀 👀 🎀 C+ reviewed

@ABee-Tech
Copy link
Contributor Author

Android screenshot updated.

* component because then we are not changing the room's name
*
* @param {String} roomName
* @param {Object[]} reports
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* @param {Object[]} reports
* @param {Object} reports

*/
function isExistingRoomName(roomName, reports, policyID) {
return _.some(
_.values(reports),
Copy link
Contributor

Choose a reason for hiding this comment

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

_.some() should work on object collections so no need to use _.values() here

https://underscorejs.org/#some

isLoading={this.props.isLoadingRenamePolicyRoom}
isDisabled={shouldDisableRename}
Copy link
Contributor

Choose a reason for hiding this comment

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

NAB (as we are conducting an audit of all forms now) but no form buttons should be disabled

Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be disabled for this case when user is seeing settings for default policies #admins, etc. I haven't seen the new Form style draft so I can't think of anything apart from it.

Copy link
Contributor

Choose a reason for hiding this comment

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

We'll release the guidelines soon. Basically, no forms should be disabled for any reason.

Copy link
Member

@parasharrajat parasharrajat Feb 23, 2022

Choose a reason for hiding this comment

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

Ok. Thanks. Also, the input is read-only here so I think disabling the button is justified. Another approach could be to hide the Rename form for default policies.

}

// We error if the room name already exists. We don't care if it matches the original name provided in this
// component because then we are not changing the room's name.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really understand the comment. In particular...

We don't care if it matches the original name provided in this component because then we are not changing the room's name.

What does this have to do with the check we make? How is it determined that the name in state matches the "original name provided in this component"? Which variable represents that "original name"? Can we be more specific or is the comment out of context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marcaaron Yes actually it is out of context for this page so we should remove this and we can be more specific on same comment on ReportSettingsPage by just modifing it as We don't error if the room name matches same as previous.

@ABee-Tech
Copy link
Contributor Author

@marcaaron Please review the changes.

@marcaaron marcaaron merged commit 2f14cb7 into Expensify:main Feb 23, 2022
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.40-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Mar 1, 2022

🚀 Deployed to production by @yuwenmemon in version: 1.1.40-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@Stutikuls
Copy link

Stutikuls commented Mar 8, 2022

Issue 1 -

Title- [Medium] Chrome +Jaws : 'Room Name' text edit field is not marked as required and announced.
Actual - The fields 'Room name' text field is required to be filled but is not announced as required and no visual "" sign for required field.
Expected -If the form element is required, it should be announced as such for the screen reader users and visual "
" sign for required field should be there.
WCAG failure - 1.3.1
Reproducible in staging?: - Yes
Version Number: - v1.1.40-2
Platforms - Web (Chrome + Jaws), Desktop (MAC), iOS(Voiceover), Mobile - web(Safari + Voiceover), Android (Talkback)

7098_.Room.Name.text.edit.field.is.not.marked.as.required.and.announced.mp4

Issue 2 -

Title-[Medium] Chrome + Jaws: Screen reader : Error message is not announced by the screen reader.
Actual - Screen reader does not announce any inline error message appear below to text boxes.
Expected - Inline error message should be conveyed to the users as soon as it appear on the fields so that user can resolve the error.
WCAG failure - 3.3.1
Reproducible in staging?: - Yes
Version Number: - v1.1.40-2
Platforms - Web(Chrome + Jaws), Desktop(MAC), Mobile-web (Safari + Voiceover), iOS(Voiceover), Android (Talkback)

7098_Error.message.is.not.announced.by.the.screen.reader.mp4

Issue 3 -

Title-[Medium] Chrome + Jaws: Screen reader : Screen reader is not provide any information after creating the room.
Actual - Screen reader does not announce any information after creating the room, screen reader is reading some extra hidden information.
Expected - After creating the room, focus should lands on the name of the room(new) and should read the new created room name.
WCAG failure - 1.3.1
Reproducible in staging?: - Yes
Version Number: - v1.1.40-2
Platforms - Web(Chrome + Jaws), Desktop(MAC), Mobile-web (Safari + Voiceover), iOS(Voice over), Android (Talkback)

7098_N0t.provide.any.information.after.creating.the.room.mp4

Issue 4 -

Title-[Medium] Safari+ Voiceover : Screen reader : Screen reader is not reading role for 'create room' control.
Actual - Screen reader only announce "create room".
Note - On Mac reading "create room Group" when focus lands on the create room control.
Expected - Role should define as 'Button' and screen reader should read like "Create room button.
WCAG failure - 4.1.2
Reproducible in staging?: - Yes
Version Number: - v1.1.40-2
Platforms - Desktop(MAC), Mobile-web (Safari + Voiceover)

7098_Not.reading.the.role.for.Create.room.control.mp4

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