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

Save button is not disabled even when User has not edited anything in Edit Workspace #4490

Closed
aman-atg opened this issue Aug 7, 2021 · 16 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@aman-atg
Copy link
Contributor

aman-atg commented Aug 7, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Login to newDot
  2. Go to any Workspace page
  3. Edit workspace
  4. Even without editing anything "Save" Button will be active

Expected Result:

Button should be disabled when nothing has change

Actual Result:

image

Workaround:

Visual issue.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

@aman-atg aman-atg added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 7, 2021
@MelvinBot
Copy link

Triggered auto assignment to @mallenexpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 7, 2021
@aman-atg
Copy link
Contributor Author

aman-atg commented Aug 7, 2021

Proposal

  • I'll disable the button if the values aren't changed
        const isButtonDisabled = this.props.policy.name === this.state.name.trim();

@aman-atg aman-atg changed the title Save button is not disabled even when User has not edited anything in Workspace Page Save button is not disabled even when User has not edited anything in Edit Workspace Aug 7, 2021
@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 labels Aug 10, 2021
@MelvinBot MelvinBot removed the Overdue label Aug 10, 2021
@mallenexpensify
Copy link
Contributor

on hold, will revisit in a week-ish

@mallenexpensify mallenexpensify changed the title Save button is not disabled even when User has not edited anything in Edit Workspace [HOLD] Save button is not disabled even when User has not edited anything in Edit Workspace Aug 10, 2021
@mallenexpensify
Copy link
Contributor

still on hold.. likely coming off soon..

@mallenexpensify
Copy link
Contributor

@aman-atg , I think we should wait til people are allowed to create new workspaces on staging then check to see if the save button is still highlighted with no text in the box. I just tried to create a new workspace with no luck, it might be because I'm the 'Expensify' account though.

@MelvinBot MelvinBot removed the Overdue label Aug 31, 2021
@aman-atg
Copy link
Contributor Author

aman-atg commented Sep 3, 2021

Well, we can do that but the issue was that the "Save" Button is being highlighted even when no editing was done.
Like for Profile and all other forms if user hasn't edited anything it should kept disabled.

Screenshot 2021-09-03 at 4 30 43 PM

@mallenexpensify
Copy link
Contributor

Ok, I think I'm seeing it now. It's a low value issue but, we should be consistent between having the save button not highlighted in edit workspace if there are no changes like it is in profile edit.

Moving along to an engineer for more eyes.

image

@MelvinBot
Copy link

Triggered auto assignment to @tylerkaraszewski (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@mallenexpensify mallenexpensify changed the title [HOLD] Save button is not disabled even when User has not edited anything in Edit Workspace Save button is not disabled even when User has not edited anything in Edit Workspace Sep 3, 2021
@tylerkaraszewski
Copy link
Contributor

This seems fairly trivial. And not really that important, but if we do it in the rest of the app, then consistency is nice. Sure, go ahead.

@tylerkaraszewski tylerkaraszewski removed their assignment Sep 3, 2021
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 8, 2021
@MelvinBot MelvinBot added Daily KSv2 and removed Weekly KSv2 labels Sep 8, 2021
@MelvinBot MelvinBot added Weekly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors and removed Daily KSv2 labels Sep 8, 2021
@MelvinBot
Copy link

Triggered auto assignment to @timszot (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@mallenexpensify
Copy link
Contributor

Job posted - https://www.upwork.com/jobs/~018a28b490d8741d12
@timszot , can you review @aman-atg 's proposal here #4490 (comment)

@mananjadhav
Copy link
Collaborator

mananjadhav commented Sep 8, 2021

I'd like to highlight that I was asked to resolve this as a part of this PR #4801 . Please refer this comment #4487 (comment)

@timszot
Copy link
Contributor

timszot commented Sep 8, 2021

Looks good to me! @mallenexpensify let's hire @aman-atg for his proposal.

@mallenexpensify
Copy link
Contributor

@mananjadhav are you suggesting that if we put this issue on hold, it'll end up being fixed by one/both of the issues you linked above?

@mananjadhav
Copy link
Collaborator

Yes, @mallenexpensify. Save button is enabled only when the image or title is changed. It was just merged today.

@aman-atg and @timszot can also confirm. Following is code change that handles it.

 const isButtonDisabled = policy.isAvatarUploading 
                                              || (this.state.avatarURL === this.props.policy.avatarURL          
                                                     && this.state.name === this.props.policy.name);

@aman-atg
Copy link
Contributor Author

aman-atg commented Sep 9, 2021

Cool, this can be closed now. (As the issue is already fixed by another PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants