Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Preview Page before Redirection #44

Open
sweezyio opened this issue Jan 18, 2019 · 16 comments
Open

Preview Page before Redirection #44

sweezyio opened this issue Jan 18, 2019 · 16 comments

Comments

@sweezyio
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
It could be frustrating to click a Gobo link and it takes you to a completely different project/studio/discuss page than what someone has told you.

Describe the solution you'd like
An option to turn on a preview mode for the shortened link (maybe a checkbox if the user wants to enable a preview)
On this preview page, there could be the project title, view number, love number, star number, Gobo link click number and maybe a thumbnail of the project page. Then, at the bottom of the page, there could be two buttons that say "Continue -->" and "Cancel".

Describe alternatives you've considered
There is no alternative.

@Andreto
Copy link
Member

Andreto commented Jan 18, 2019

This would mean that we would have to use some kind of database and cookies to keep track of peoples settings.

@sweezyio
Copy link
Collaborator Author

Oh, I see what you mean. What I was talking about was having the option when shortening the link to click a checkbox if they wanted the link to have a preview. If this box was checked then it would give a different link than if it wasn't clicked. (Maybe a subdomain of gobo.cf [Possibly p.gobo.cf]) So for a project, say 266580105, instead of the link being "https://gobo.cf/p#i2xF7" it would be "https://p.gobo.cf/p#i2xF7". However, this would have to be hosted in a separate repository.

@Andreto
Copy link
Member

Andreto commented Jan 18, 2019

Oh, ye that would be totally doable.

@ScratchUtilities ScratchUtilities deleted a comment from radioblahaj Mar 5, 2019
@ScratchUtilities ScratchUtilities deleted a comment from radioblahaj Mar 5, 2019
@sweezyio
Copy link
Collaborator Author

sweezyio commented Mar 5, 2019

I have found a way to get the link of the thumbnail.

Scratch Wiki

This would allow us to begin work on this portion of the project.

@space-elephant
Copy link
Member

for projects, add "api." to the beginning of the domain name (https://api.scratch.mit.edu/projects/279457375)
for studios, https://scratch.mit.edu/site-api/projects/in/5081005/1/, but with a request to the actual studio page as well for the title
for users, again add "api." (https://api.scratch.mit.edu/users/space_elephant)
for topics and posts, the data is in the HTML.

@space-elephant
Copy link
Member

Also, we can use cookies to store preview state.

@Andreto
Copy link
Member

Andreto commented Mar 8, 2019

@space-elephant The current version works well but maybe we should probably make it off as standard, put a beta tag next to it and move it to the edge until it's styled and finished.

@space-elephant
Copy link
Member

The current version works for all except discuss. I need an HTML parser for that. I am using DOM.
Also, do you know how to make the checkbox style correctly?
I tried to copy if for ScratchUtilities/gobo-serverside/files/index.html with submit buttons unsuccessfully.

@sweezyio
Copy link
Collaborator Author

Glad to see this feature is working! Although, I do think it could use a "Continue to {project/project editor/user/studio/discuss page}" button instead of just having the link at the top of the page.

@space-elephant
Copy link
Member

#44 (comment) but then where can I show the link?

@Andreto
Copy link
Member

Andreto commented Mar 11, 2019

@space-elephant @kennethsweezy Maybe we can just change the innerHTML of the link to be "Continue to link" or something. Maybe we can also have a small link with the address at the bottom.

@sweezyio
Copy link
Collaborator Author

@space-elephant I don't think that it is completely necessary if we have a button.

@space-elephant
Copy link
Member

@space-elephant I don't think that it is completely necessary if we have a button.

#44 (comment) or #44 (comment)?

@sweezyio
Copy link
Collaborator Author

@Andreto @space-elephant I found this and thought it might work well for the discussion, studio, and user pages.

@space-elephant
Copy link
Member

@Andreto @space-elephant I found this and thought it might work well for the discussion, studio, and user pages.

why not just use https://cors-anywhere.herokuapp.com/ and get the page, and then have html and not png?

@sweezyio
Copy link
Collaborator Author

sweezyio commented Apr 10, 2019

If you think that is doable then I see no reason why you couldn't do it that way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants