Short URLs with special characters for Data Explorer
As Claudia,
I want to be able to create short urls without special (unsafe) characters, such as squared brackets, for the search result and visualisation pages of the Data Explorer,
So that I can use those URLs in the COM dissemination tools, which do not support special characters or very long URLs, and that I can use the URLs in printed material.
Functional specs
-
On the search and visualisation pages, under a/the Share menu, introduce a new UI feature to generate a "short url" that can be used to access the current page with all its URL parameters.
-
The new feature consists of a standard ("blue") DE button initially labelled "Generate short URL" (en) and an empty size-adjustable text field (similar to Developer API fields). Clicking the new button:
- creates on the fly and copies into the clipboard a short URL with a unique ID corresponding to the current DE URL with all its parameters
- changes the button label to "Copied!" (en)
- fills the text field with the short URL, so that the user can then again manually copy the short URL.
-
This UI feature is only active/visible when the user is authenticated.
-
The following pages are impacted (see mockups below) only when being authenticated:
- search result page: add "Share" menu item after the "Sort by" menu item, which opens the Share dialog window containing only the new feature
- viz page for table and chart views: add new feature to existing Share dialog window
- viz page for overview view: add "Share" menu item (at same position than for tables and charts), which opens the Share dialog window containing only the new feature
-
When opening this short URL, if the corresponding DE URL is not valid, then a DE error page should be displayed.--> addressed in #1307 (closed). -
Clicking on "Generate short URL" will always generate a new unique short URL even if the DE page state is the same.
-
Action PM to come up with 2 error messages for 2 use cases:addressed in #1326BE fails to generate a short URLshort URL fails in a web page browser
Mockups
Search page
- New Share menu item and Share dialog window:
- once the button is clicked:
Table and chart views on the Viz page
- New feature in existing Share dialog window:
- once the button is clicked:
- Responsive design:
Overview view on Viz page
- New Share menu item and Share dialog window:
- once the button is clicked:
Obsolete design
- Introducing a new button on top-right header page triggering a dialog box on click:
- default popup window state:
- on mouse over:
- clicked:
Technical specs
- new internal service to handle urls:
- internal:
- like config, no url required
- skip security concerns
- name to be defined for repo and docker image
- new service:
- better to have small, dedicated service to ensure a simpler codebase and ops lifecycle
- possibility for SISCC to use it or not depending on the need
- there is not a lot of common things with the current share service and the share service is public
- internal:
write flow:
- user from the DE client has a way to bookmark the current browser url
- the bookmark request is sent to DE server with a bearer token (user should be logged)
- DE server check bearer token with authority service, ask for email and apply the limitation (only oecd.org)
- DE server returns 401 or send a request to URL shortener service
- URL shortener service saves the url and the email in a dedicated mongo database
- URL shortener service returns the id of the shorten url to DE server (or an error if something goes wrong)
- DE server returns the shorten url to DE client (or the error)
notes: no listing and no edition in the first iteration, no email
additional features:
- access counter
- last accessed