-
-
Notifications
You must be signed in to change notification settings - Fork 16
Feature/redirects #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/redirects #247
Conversation
🦋 Changeset detectedLatest commit: 8773d3f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new "Redirects" add-on, providing an interface within the Strapi admin panel to manage URL redirects automatically. Key changes include:
- Registration of the add-on routes and components in the admin panel.
- Implementation of a form for creating and editing redirects with client-side validation.
- Addition of end-to-end Cypress tests for ensuring redirects functionality.
Reviewed Changes
Copilot reviewed 65 out of 69 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/addons/redirects/admin/index.ts | Registers new routes for the Redirects add-on |
packages/addons/redirects/admin/index.cy.jsx | Implements Cypress tests for the add-on workflow |
packages/addons/redirects/admin/helpers/* | Provides helper functions for translations and plugin identification |
packages/addons/redirects/admin/components/RedirectForm/index.tsx | Implements the form component for redirect management |
Other files | Documentation, license, configuration, and changeset updates |
Files not reviewed (4)
- package.json: Language not supported
- packages/addons/redirects/.eslintignore: Language not supported
- packages/addons/redirects/.gitignore: Language not supported
- packages/addons/redirects/.npmignore: Language not supported
Comments suppressed due to low confidence (2)
packages/addons/redirects/admin/index.ts:15
- The route name 'settings-route' is used for multiple routes. Consider using unique names (e.g., 'redirects-list', 'redirects-new', 'redirects-edit') to avoid potential conflicts.
name: 'settings-route',
packages/addons/redirects/admin/components/RedirectForm/index.tsx:75
- Calling setErrors inside the render callback could trigger unnecessary re-renders. Move error state updates outside the render phase or use Formik's built-in error handling to avoid potential performance issues.
if (!isEmpty(errors)) {
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
==========================================
+ Coverage 42.41% 44.19% +1.78%
==========================================
Files 2 2
Lines 639 663 +24
Branches 156 164 +8
==========================================
+ Hits 271 293 +22
Misses 293 293
- Partials 75 77 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closed in favor of #249 |
What does it do?
Introduces a new add-on called "Redirects". It offers the ability to manage your redirects in the Strapi admin panel, with automatic redirect generation whenever you change the URL of a page.
Why is it needed?
To address #28
How to test it?
Setup the development environment as described in the CONTRIBUTING.md. Start up the admin panel and notice the Redirects page.