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): Added hot reloading in our /classes page #357

Merged
merged 4 commits into from
Jul 31, 2023

Conversation

GuillermoFloresV
Copy link
Member

@GuillermoFloresV GuillermoFloresV commented Jul 9, 2023

Checklist:

Closes #365

Our classes page is not currently taking advantage of hot reloading, this PR introduces changes to take advantage of this feature.

Once we load our /classes page, we save them into a state. This state will help us keep track of our classes (adding, editing, deleting)

We are using our response to build the class into our DOM to ensure that the server and client are always matched together.

Here are GIF comparisons of the two experiences:

Before

Creating a classroom:

old-classes

Deleting a classroom:

old-deletion

After

Creating a classroom:

new-classes-fast-refresh

Deleting a classroom:

deletion-fast-refresh

@lloydchang
Copy link
Contributor

@Komal914 See above.

@Komal914
Copy link
Contributor

@lloydchang yes, I think this may be what is causing the Alerts to disappear, since the page refreshes right after

@GuillermoFloresV GuillermoFloresV marked this pull request as ready for review July 19, 2023 17:59
@GuillermoFloresV GuillermoFloresV requested a review from a team as a code owner July 19, 2023 17:59
@GuillermoFloresV GuillermoFloresV enabled auto-merge (squash) July 19, 2023 17:59
@lloydchang
Copy link
Contributor

lloydchang commented Jul 22, 2023

Status: @Komal914 confirmed that this #357 is blocking #134

On July 17th, Komal Kaur messaged Lloyd Chang, Guillermo Flores V in CodeDay Labs #help-desk channel at https://codedayorg.slack.com/archives/C05EZKUU456/p1689623550089979?thread_ts=1689278492.275899

I pulled in the commits from fast-reload-classes and the alerts are staying up for the full 5 seconds 🙂

Attached: Screen Recording 2023-07-17 at 12.52.04 PM.mov

Guillermo Flores V replied:

Great, that pr should hopefully be merged soon!

@GuillermoFloresV
Copy link
Member Author

Status: @Komal914 confirmed that this #357 is blocking #134

On July 17th, Komal Kaur messaged Lloyd Chang, Guillermo Flores V in CodeDay Labs #help-desk channel at https://codedayorg.slack.com/archives/C05EZKUU456/p1689623550089979?thread_ts=1689278492.275899

I pulled in the commits from fast-reload-classes and the alerts are staying up for the full 5 seconds 🙂

Attached: Screen Recording 2023-07-17 at 12.52.04 PM.mov

Guillermo Flores V replied:

Great, that pr should hopefully be merged soon!

My PR is currently in review, sorry about the delay but I cannot merge it myself since I am the PR author.

Once the PR is merged we can move to reviewing Komal's PR

@GuillermoFloresV GuillermoFloresV merged commit 29457a8 into main Jul 31, 2023
@GuillermoFloresV GuillermoFloresV deleted the fast-reload-classes branch July 31, 2023 01:36
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.

/classes should take advantage of fast-refresh.
4 participants