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

Prevent profile updates without changes #2849

Merged
merged 18 commits into from
Nov 30, 2024

Conversation

luiqor
Copy link
Contributor

@luiqor luiqor commented Nov 22, 2024

Fix:
The ‘Update’ button is disabled after refreshing the page:

bandicam.2024-11-22.18-56-48-374.mp4

The ‘Update’ button becomes active when there are new changes:
(all fields accurate work is demonstrated)

bandicam.2024-11-22.19-02-02-230.mp4

Photo:
( Recordings are made before Fixed changing a user photo in the header (#2812) commit)

  • The initial state and the current state of the photo are compared correctly.
  • The ''expected by backend" data are sent to the server when the user removes the photo.
bandicam.2024-11-22.18-58-44-683.mp4
bandicam.2024-11-22.18-59-10-851.mp4

VideoLink:

  • The initial state and the current state of the videoLink are compared correctly.
  • The videoLink type is represented accurately in the state.
  • Only the videoLink associated with the current user role is sent to the server for updates.
bandicam.2024-11-22.19-02-48-326.mp4

Additional:

  • Add fetching data from server before leaving the page to prevent showing not applied changes to user (For instance, avatar that was updated in redux state, but not updated on sever) As shown in the recording at 00:18
  • Extract separate utils, add tests for them

@luiqor luiqor added bug Something isn't working Tutor Implementation that regard to the tutor Student Implementation that regard to the student Functional Something isn't working Edit labels Nov 22, 2024
@luiqor luiqor self-assigned this Nov 22, 2024
@luiqor luiqor force-pushed the bugfix/2807/disallow-update-profile-without-changes branch from c6b74c3 to f809939 Compare November 23, 2024 10:48
@luiqor luiqor force-pushed the bugfix/2807/disallow-update-profile-without-changes branch from 94a7a59 to 6ea36f0 Compare November 23, 2024 12:14
@luiqor luiqor force-pushed the bugfix/2807/disallow-update-profile-without-changes branch from 7c024ac to 913c74b Compare November 23, 2024 15:03
@luiqor luiqor marked this pull request as ready for review November 23, 2024 15:25
}
}

void dispatch(updateProfileData(payload))
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider removing the void operator for better maintainability.
Link

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved ✅

@luiqor luiqor merged commit c2908ec into develop Nov 30, 2024
9 checks passed
@luiqor luiqor deleted the bugfix/2807/disallow-update-profile-without-changes branch November 30, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Edit Functional Something isn't working Student Implementation that regard to the student Tutor Implementation that regard to the tutor
Projects
None yet
4 participants