Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Suggestion: redirect to law/paragraph if there is only one search result #1

@luap42

Description

@luap42

When testing the alpha deployment of the rechtsinfo application, I was having the following usability suggestion:

  • If the search query looks like a law / paragraph ("§"/"Art."/"Art"/"Artikel" + " " + a number + " " + an alphanumeric string (the legal abbreviation)), and
  • if there is exactly one search result,

-> redirect to the paragraph/law page, instead of rendering the search results list.

This increases the usability, because I'll save one click when intending to go to a certain law or pargraph. Since the redirect will only happen, when there is exactly one search result, you won't accidentally miss other references to the law you might be searching for. I also assume, that this is going to be a common use case: looking for one specific law.

A sample regex to identify such law-like queries could be:

/(§|Art\.?|Artikel) [0-9]+[a-z]? [A-Za-z-]+/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions