DemocracyClub / yournextrepresentative

👥 A website for crowd-sourcing structured election candidate data
https://candidates.democracyclub.org.uk
GNU Affero General Public License v3.0
21 stars 27 forks source link

New tab for image searches #2378

Closed edent closed 3 weeks ago

edent commented 4 weeks ago

Stops user leaving the page when working on something.

As per https://css-tricks.com/use-target_blank/#aa-a-good-reason-the-user-is-working-on-something-on-the-page-that-might-be-lost-if-the-current-page-changed

I found that I kept opening image search links in the same tab, which lost the work I was doing.

### PR Checklist
- [ ] Update changelog (ie https://keepachangelog.com/en/1.0.0/)
- [X] References a specific issue or if not, describes the bug or feature in detail
- [ ] Note what card in Trello this work relates to
- [ ] Instructions for how reviewers can test the code locally
- [ ] Tests have been added and/or updated
- [ ] Screenshot of the feature/bug fix (if applicable)
- [ ] If any new text is added, it's internationalized
- [ ] Any new elements have aria labels
- [ ] No unintentional console.logs left behind after debugging
- [ ] Did I use the clear and concise names for variables and functions?
- [X] Did I explain all possible solutions and why I chose the one I did?
- [ ] Added any comments to make new functions clearer
- [ ] Did I added or updated any new dependencies? Explain why.
- [ ] Did I update the package.json and/or Pipfile.lock version if relevant?
- [ ] Have I rebased with the latest version of master?
- [ ] Added PR labels
- [ ] Update any history/changelog file
- [ ] Update any documentation
- [ ] Update dev handbook
VirginiaDooley commented 3 weeks ago

Completed in https://github.com/DemocracyClub/yournextrepresentative/pull/2385