Webbist-dev / strapi-redirects

Manage redirects in Strapi
MIT License
14 stars 6 forks source link

Type Enum defaults to 302 Temporary redirection #17

Closed chris-barklem closed 7 months ago

chris-barklem commented 7 months ago

Problem Statement: When using the redirections plugin with my team, I've noticed several issues that may impact usability and effectiveness. Errors were introduced into the redirections for several reasons that all stemmed from the selector of the redirection type.

Observations: Redirection Types: The plugin provides options for various HTTP redirection types, including (in this order):

302 Temporary 301 Moved Permanent 307 Found 410 Gone 451 Unavailable For Legal Reasons

Usability Concerns: In most cases, users typically require a 301 Moved Permanently redirection, yet selecting the appropriate option manually or programmatically on every form submission increases the workload significantly.

Dropdown Order: The dropdown for selecting redirection types is not in alphabetical or numerical order. This non-standard ordering may lead to increased cognitive load for users and potential errors in selection.

Default selected state: By offering a "default selected state", it was (or could be) assumed that the default was the preferred selection state, and a user that did not fully understand HTTP redirection types left the selection alone rather than obtaining the required knowledge because the selection decision had already been made for them (instead of them having to find out the right information to make the right decision).

Intentional Design: While it's unclear if the current behavior is by design, it's possible that the plugin's creators intended for users to manually correct incorrectly redirected 302 responses to 301 later as 302 is less damaging as a mistake.

Potential Solutions: If the development team aimed to reduce errors and improve usability, alternative solutions such as setting an "Unselected" / "Select redirection type" default option for the redirection type dropdown could be explored. This would allow users to skip redirection until explicitly selected, potentially mitigating the risk of unintentional temporary redirections.

Proposed Solution Default Redirection Type: Consider setting a default redirection type, such as 301 Moved Permanently, to align with common use cases and reduce manual selection overhead OR investigate a "Select redirection type" enum option which does nothing until an actual type is selected.

Dropdown Ordering: Arrange the options in the redirection type dropdown alphabetically or numerically to enhance user experience and minimize errors during selection.

Webbist-dev commented 7 months ago

I changed it from 301 to 302 as the default due to feedback elsewhere. There is an import function to make this easier for you, just give the plugin a csv to import rather than doing it manually.