Skip to content

New Feature: Forcerefresh #7

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

Closed
wants to merge 7 commits into from
Closed

Conversation

thorst
Copy link
Collaborator

@thorst thorst commented Apr 18, 2014

Proper pull request for a new feature called forcerefresh.

Current behavior:
if popup is still open it will refresh the window. If the user clicked a link and was taken to a different page, they will be taken back to the original page. Likewise, if the user has entered text on a form or performed some action that needed saved, they will lose any unsaved work.

With Forcerefresh:
this will allow users to define if they want to refresh the window should it still exist. This requires them to pass a name for that window, and toggle force refresh off. if they dont want to refresh and it still exists it will simply bring it into focus

thorst added 5 commits April 18, 2014 12:58
this will allow users to define if they want to refresh the window should it still exist. This requires them to pass a name for that window, and toggle force refresh off. if they dont want to refresh it will simply bring it in focus
I tried using localstorage api, but you cannot store the object and retrieve it. Maybe IndexedDB would work, but this hack works just as well at grabbing a refrence, even if the parent page was refreshed.
I think its smarter to check if its not undefined. I dont know if its standard to be `about:blank`
@thorst
Copy link
Collaborator Author

thorst commented Apr 19, 2014

Im still working on this. Ill let you know when its done.

@thorst
Copy link
Collaborator Author

thorst commented Apr 19, 2014

I think its right now. Sorry about the delay.

@lencioni
Copy link
Collaborator

Thanks for the pull request!

I don't think I understand this feature or where someone might want to use it. Can you give me an example scenario?

I haven't looked at the code yet, but it would be easier to review if you squished some of these commits. It is good to be atomic, but it isn't helpful in a pull request to have a commit that makes a change followed by a few commits that fix problems in that change. Also, my comments regarding commit messages on another pull request of yours also applies here.

@thorst
Copy link
Collaborator Author

thorst commented Apr 20, 2014

Im writing a mini help desk. Originally i was using modals, but wanted to allow them to multi task.

Using the current behavior, if they clicked a ticket, and started updating it, but never saved. Then they multi task and do something else, then they click on the ticket link again, it will refresh the popup and they will lose their work.

With this code they can click the ticket link and just resume their work. They can even refresh the main window and still resume.

In a sense i wouldn't need a global for handles but it makes the resolution quicker.

Did that explain it?

Sent from !MyComputer;

On Apr 20, 2014, at 11:26 AM, Joe Lencioni notifications@github.com wrote:

Thanks for the pull request!

I don't think I understand this feature or where someone might want to use it. Can you give me an example scenario?

I haven't looked at the code yet, but it would be easier to review if you squished some of these commits. It is good to be atomic, but it isn't helpful in a pull request to have a commit that makes a change followed by a few commits that fix problems in that change. Also, my comments regarding commit messages on another pull request of yours also applies here.


Reply to this email directly or view it on GitHub.

@thorst
Copy link
Collaborator Author

thorst commented Apr 20, 2014

The reason i called it force refresh, was actually to give a name to the current behavior.

Initially i wasn't planning on the persistent piece, but i had some time so i added it. At this point i guess i just wanted some feedback so that if you had any corrections i would fix it, and then do a proper pull request.

Sent from !MyComputer;

On Apr 20, 2014, at 11:26 AM, Joe Lencioni notifications@github.com wrote:

Thanks for the pull request!

I don't think I understand this feature or where someone might want to use it. Can you give me an example scenario?

I haven't looked at the code yet, but it would be easier to review if you squished some of these commits. It is good to be atomic, but it isn't helpful in a pull request to have a commit that makes a change followed by a few commits that fix problems in that change. Also, my comments regarding commit messages on another pull request of yours also applies here.


Reply to this email directly or view it on GitHub.

@thorst
Copy link
Collaborator Author

thorst commented Apr 21, 2014

I created #12 which hopefully fixes your concerns here.

@thorst thorst closed this Apr 21, 2014
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.

2 participants