-
Notifications
You must be signed in to change notification settings - Fork 14
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
Storing state of the app as a bookmark #659
Closed
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
28f0885
Make ui variable which has shinyUI insside a function with request as…
usr110 58606ee
Add a bookmark button without any label
usr110 38e8fdd
Change icon of bookmark button from link to bookmark
usr110 b7f7ec7
Enable bookmarking functionality which saves the state of the app on …
usr110 9494e03
Save state's region in a region var and restore it when session is re…
usr110 6da322f
Store and then restore map lat and lng along with zoom for state
usr110 7bb66c9
Merge remote-tracking branch 'origin/master' into bookmark
usr110 ef48e28
Use onRestored function to set the map's location after all observe b…
usr110 95c3b84
Move comments inside the function
usr110 0dd87b6
Remove additional checks for state_region. Relevant to https://github…
usr110 fdd151b
Dummy attempt at keeping URL short
nikolai-b File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally suggest saving API keys in the
.Renviron
file, as described here: https://csgillespie.github.io/efficientR/set-up.html#renviron in this case. Is there no issue with rate limits? Maybe no issue sharing this with the world in that case... Another compromise, in this case between the + of short urls and the + of reducing dependencies. In this case I'd lean slightly towards reducing dependencies although can understand the desire to keep URLs short.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nudge on this @nikolai-b - suggest not publicising the key in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting @Robinlovelace ! Very late response sorry I just saw this. You can see the commit message is
This API key was locked down to only work from pct.bike and I disabled a few days after posting it here (was just so others could try it) but it just shows what we could do...
Since then the whole goo shortner has been deprecated so to be completely clear this is not the approach I'd suggest it was just to show it was possible to hack the URL to make it shorter, I think using
assignInNamespace
is probably a bad idea!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never come across
assignInMyNamespace
. The standard way for users to handle API keys now is:Would that approach work on the server (if we ever did want to use API keys)?
Late response to a late response!