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

Reloading gists when switching from gists to local #96

Open
kodaman2 opened this issue Oct 5, 2019 · 8 comments
Open

Reloading gists when switching from gists to local #96

kodaman2 opened this issue Oct 5, 2019 · 8 comments

Comments

@kodaman2
Copy link
Contributor

@kodaman2 kodaman2 commented Oct 5, 2019

Describe the bug
Repetitive loading have you waiting on gists loading.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Gists, see the loading circle
  2. Click on local
  3. Go back to gists, and a new loading circle appears

Expected behavior
I think the loaded gists should remain loaded even when going to local, and maybe have a refresh button if you want to pull new gists from profile. I have about 20+ gists not much, and I have to wait a few seconds before seeing my gists load.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version1.2.2
@lauthieb
Copy link
Owner

@lauthieb lauthieb commented Oct 5, 2019

Hello @kodaman2,
Yes you're right, I think it could be nice to have a "refresh" button.

@lauthieb lauthieb added this to To do 💪 in Kanban board via automation Oct 5, 2019
@kodaman2
Copy link
Contributor Author

@kodaman2 kodaman2 commented Oct 5, 2019

I'll see what I can come up for this issue.

@jodli
Copy link

@jodli jodli commented Oct 5, 2019

Maybe just use this package?

@jodli
Copy link

@jodli jodli commented Oct 5, 2019

I've tried it and it seems to work quite nicely. Maybe this is already good enough for now and something to work with?

@kodaman2
Copy link
Contributor Author

@kodaman2 kodaman2 commented Oct 5, 2019

I'll take a look at it tonight. Looks like is heading in the right direction. 😀 I still think the reloading needs to be handled another way like maybe Note.js new state property gistsLoaded, and a refresh button tied to the load action and/or a shortcut such as cmd/ctrl + r.

@jodli
Copy link

@jodli jodli commented Oct 5, 2019

You give it a go then. Didn't want to steal this issue from you! :(

@kodaman2
Copy link
Contributor Author

@kodaman2 kodaman2 commented Oct 5, 2019

@jodli You're good, I'll try to submit a commit to your PR and that way is both our idea. 👍😁

@lauthieb lauthieb moved this from To do 💪 to In progress 🚧 in Kanban board Oct 6, 2019
@lauthieb lauthieb added this to the V1.3.0 milestone Oct 6, 2019
@lauthieb lauthieb pinned this issue Oct 7, 2019
@kodaman2
Copy link
Contributor Author

@kodaman2 kodaman2 commented Oct 9, 2019

Ok, now that I am done with the ghe auth PR, I can get back to this one. It might take me a little longer but cache or avoiding full notes reload will be implemented no doubt : )

After looking at the way the notes are loaded, it appears after each action (delete, edit, create), we fired up loadNotes which reloads all the notes each time.

What I am thinking is that after each edit, I'm going to update just each NoteCard without refreshing NotesList. And after create, or delete reactively update NotesList component without all the overhead of all the http gists requests. Of course we'll have to check github if any gists are added so gists.list() has parameter since: YYYY-MM-DDTHH:MM:SSZ which returns gists only since that date, and then those new gists can be added to the list of notes object. We'll that's the theory anyways, always easier on paper. Open to any ideas.

@lauthieb lauthieb removed the hacktoberfest label Nov 2, 2019
@lauthieb lauthieb unpinned this issue Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Kanban board
  
In progress 🚧
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.