-
Notifications
You must be signed in to change notification settings - Fork 921
Feat/update layout redirects #22319
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
base: feature/redirection20
Are you sure you want to change the base?
Feat/update layout redirects #22319
Conversation
@@ -245,9 +245,6 @@ Content.propTypes = { | |||
articleTypeOptions: schemaTypeOptionsPropType.isRequired, | |||
showArticleTypeInput: PropTypes.bool.isRequired, | |||
additionalHelpTextLink: PropTypes.string.isRequired, | |||
helpTextLink: PropTypes.string.isRequired, | |||
helpTextTitle: PropTypes.string.isRequired, | |||
helpTextDescription: PropTypes.string.isRequired, |
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.
Out of scope
@@ -227,7 +227,7 @@ WincherUpgradeCalloutDescription.propTypes = { | |||
* | |||
* @returns {wp.Element | null} The Wincher upgrade callout. | |||
*/ | |||
const WincherUpgradeCallout = ( { onClose, isTitleShortened, trackingInfo } ) => { | |||
const WincherUpgradeCallout = ( { onClose = () => {}, isTitleShortened = false, trackingInfo = {} } ) => { |
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.
Out of scope
@@ -15,7 +15,7 @@ import TextInput from "../../base/text-input"; | |||
* | |||
* @returns {WPElement} A wrapped TextInput for the social inputs. | |||
*/ | |||
export default function SocialInput( { id, onChange, socialMedium, isDisabled, ...restProps } ) { | |||
export default function SocialInput( { id = "", onChange = () => {}, socialMedium = "", isDisabled = false, ...restProps } ) { |
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.
Out of scope, should be in a separate PR.
@@ -17,7 +17,7 @@ import { STORE_NAME } from "../constants"; | |||
* | |||
* @returns {JSX.Element} The alert item component. | |||
*/ | |||
const AlertItem = ( { id, nonce, dismissed, message } ) => { | |||
const AlertItem = ( { id = "", nonce = "", dismissed = false, message = "" } ) => { |
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.
Out of scope, should be in a separate PR.
@@ -10,7 +10,7 @@ import { useSelectGeneralPage } from "../hooks"; | |||
* @param {JSX.node} children The children. | |||
* @returns {JSX.Element} The element. | |||
*/ | |||
export const SidebarLayout = ( { contentClassName, children } ) => { | |||
export const SidebarLayout = ( { contentClassName = "", children = null } ) => { |
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.
Out of scope, should be in a separate PR.
className="yst-button yst-button--secondary yst-min-h-[40px]" | ||
> | ||
{ __( "Apply", "wordpress-seo" ) } | ||
</button> |
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.
Why not Button
from UI-Library? If it's necessary, please mention in the PR technical choices.
className="yst-button yst-button--secondary yst-min-h-[40px]" | ||
> | ||
{ __( "Filter", "wordpress-seo" ) } | ||
</button> |
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.
Same as above, we can use Button
from ui library with variant
= seconday.
<div className="yst-paper yst-grow yst-max-w-page"> | ||
<div className="yst-space-y-6 yst-mb-8 xl:yst-mb-0"> | ||
<main> | ||
<AppRoutes pathname={ pathname } /> |
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.
Maybe we don't need to pass pathname as a prop if we can get it from useLocation
?
className="yst-pointer-events-none yst-absolute yst-top-3.5 yst-start-4 yst-h-5 yst-w-5 yst-text-slate-400" | ||
{ ...ariaSvgProps } | ||
/> | ||
<Combobox.Input |
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.
If it's an autocomplete, you can use the component from ui-library.
</>; | ||
}; | ||
|
||
Search.propTypes = { |
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.
propTypes is no longer required, we are moving away from propTypes.
), [] ); | ||
|
||
return <> | ||
<button |
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.
You can use Ui-library button
* @param {string} [props.buttonId] - The ID attribute for the search button. | ||
* @param {string} [props.modalId] - The ID attribute for the modal dialog. | ||
* @param {string} [props.userLocale] - The user's locale, used for locale-sensitive operations. | ||
* @param {Array<Object>} props.queryableSearchIndex - The searchable index data to query against. |
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.
Please specify the object property with JS docs: typedef
Hey @kyrylo-polozenko-newfold, my teammate @vraja-pro left a first round of comments above |
Context
This PR introduces the initial structure for the Redirections feature in the application. The goal is to establish a foundation for managing and displaying redirections within the admin interface.
Summary
This PR can be summarized in the following changelog entry:
Adds the basic structure and UI for the Redirections page in the WordPress SEO plugin.
Some components were also moved to the shared layer and reused on the settings and redirects pages
UI changes
This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
React frontend structure