Giter Site home page Giter Site logo

cmpct-io / frontend Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 4.0 3.92 MB

Frontend PWA website for cmpct.io - Built with VueJS and Nuxt

Home Page: https://cmpct.io

License: MIT License

JavaScript 14.87% Vue 77.37% SCSS 7.76%
nuxt productivity pwa shortened-links urlshortener vuejs

frontend's People

Contributors

dependabot[bot] avatar tommcclean avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

frontend's Issues

Using the paste function to create a route should not allow the user to submit multiple times

Describe the bug
When using the paste button on the route generator, it does not prevent double tap, meaning if clicked multiple times it posts to the API to create a route each time.

To Reproduce

  1. Go to https://cmpct.io
  2. Using the browser dev tools, slow your network speed down
  3. Use the paste button to paste a link into the box
  4. Continue clicking the paste button while you wait for a response from the API

Expected behavior
It should not be possible to submit a route, whilst one is already being submitted. However a @click.once cannot be used, as the button may be used while creating a group of links.

Desktop (please complete the following information):

  • All operating systems
  • All browsers

Adding titles/labels to submitted links

Is your feature request related to a problem? Please describe.
When creating a list of links, or visiting a landing page that contains a list of links, some of the links may be quite opaque, and it may not be immediately obvious what that page will contain. For example, a list of Google spreadsheets, or YouTube videos.

Describe the solution you'd like
On the landing page, I would like to be able to see some additional context about what the page contains, rather than having to scan the link for any clues.

Describe solutions you've considered

  • A way of manually entering a heading/label for each link as the list is created, although this adds friction. This has the potential to be more concise and appropriate, but also to be misleading.
  • Fetching the title of the page and displaying this.

I believe fetching the title would be the most effective solution, as page titles are usually descriptive enough to provide sufficient context, it does not require additional input when creating the link, and it may also provide some value for single links as well as lists. If the owner of the link is adhering to best practice, then this title should also be reasonably short which is an added benefit.

A limit should be placed on how frequently a user can create a route.

I can see that some scammers attempt to create a lot of routes for the same link, presumably this is so that when their link is reported, other links remain unreported.

Suggested solution is to find a way to throttle a user to create a certain amount of links in a given period of time.

Undecided whether this needs to occur in the front end, or in the API at the moment.

Prevent duplicate links from being added to a group

Describe the bug
Presently when creating a group of links on the website, a user can enter the same link multiple times.

To Reproduce

  1. Go to https://cmpct.io
  2. Click on the button to start a link group
  3. Add the same link more than once

Expected behavior
A message should be displayed telling the user that the link they tried to add has already been added, a duplicate link should not be added to the group

Additional context
As the site is localised, any new messages will need to be specified in the <i18n> block at the bottom of the single file component.

It should not be possible to add more than 3 links to a group

Describe the bug
Currently the UI and the API impose no limit on the number of links that can be submitted in a group. This causes UI difficulties on the shared page because the page does not scroll when it exceeds screen height, due to the use of flexbox.

It is probably best to solve this by limiting the number of links that can be added to a route, I can't see much value in having more than 3 links in a single route, so perhaps a limit like that can prevent the issue from occuring.

To Reproduce

  1. Go to https://cmpct.io
  2. Click on the button to start a link group
  3. Add more than 3 links
  4. Create the route and notice that on smaller devices, the page is not displayed correctly.

Expected behavior
Ideally we wouldn't allow this scenario, but limiting the number of routes, or by fixing the underlying UI issue on the share page

Ability to opt out (or opt in) to the history mechanic

Is your feature request related to a problem? Please describe.
Currently every time you create or view a route, an item is stored in your devices local storage so we can help you get back to them easily in the history section of the homepage (See the up arrow at the bottom of the page).

However, some users may not want a history to be recorded, even though it is on their machine. So it may be useful to either allow the user to opt out of the feature, or whether given the privacy aims of the website, ask all user's to opt in before storing anything.

Describe the solution you'd like
Either the ability to opt out (preferred), or opt in to using the local history feature

Additional context
Most visitors to the website are likely to not be aware they can clear their local storage, It is unclear whether many people use the feature at this time, though very recently an anonymous event is pushed into ApplicationInsights to indicate somebody has interacted with the feature, to understand whether the feature is valuable to the product.

Implement an easy way to toggle between dark mode and light mode on the homepage

Is your feature request related to a problem? Please describe.
Most people who know the feature exists like the choice, but currently it is quite hidden (in the language switcher). So having something on the homepage to toggle between themes could help user's to learn about the feature, choose their preference and may help them to become returning users

Describe the solution you'd like
Some way (yet undecided) to toggle theme on the homepage. This should continue to set the cookie so that the theme is remembered.

Describe alternatives you've considered
An alternative was pulling the theme controls out of the language switcher and into a theme switcher in the header. This would be more effort though and may be difficult to make work with UI on a small mobile phone.

Additional context
You can change the theme of the website by clicking on the flag in the top right corner of the website, and selecting either dark or light theme. This preference is stored as a cookie so that returning user's are pinned to their theme of choice.

Ability to clear your local history

Is your feature request related to a problem? Please describe.
When using cmpct.io, every time you create a route, or visit one, it is added to an array in your devices local storage. This data is limited to the most recent 5 routes when displayed. But it may be desirable to have the ability to clear the history.

Describe the solution you'd like
When viewing the history, it would be nice to have a way for a user to clear the history stored on their device. This way if they are using a public machine (like in a library), they can clear down their usage of the site if desired.

Describe alternatives you've considered
I haven't considered any alternative options in this case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.