Skip to content

Conversation

@jaredrethman
Copy link
Contributor

@jaredrethman jaredrethman commented Oct 8, 2024

All Submissions:

Changes proposed in this Pull Request:

Adds Newspack Multibranded Site wizard to Newspack Plugin Settings Wizard. The majority of functionality is merely a port of the Multibranded plugin.

How to test the changes in this Pull Request:

  1. Checkout this branch and build assets.
  2. Ensure Newspack Multibranded Site plugin is installed and active.
  3. Navigate to /wp-admin/admin.php?page=newspack-settings#/additional-brands
  4. Ensure Additional Brands UI loads.
    Screenshot 2024-10-21 at 09 14 41
  5. Perform Tests. For each test confirm; 1. data loaded is correct 2. Data persists between tab changes and page refreshes:
    • Add New Brand - Click "Add New Brand", input desired configuration and click "Save".
    • Edit an existing brand - Click Screenshot 2024-10-21 at 09 22 32, select "Edit", perform desired edits and click "Save".
    • Delete a brand - Click Screenshot 2024-10-21 at 09 22 32, select "Delete" and confirm.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Base automatically changed from feat/ia-settings-display-settings__part-2 to epic/ia October 14, 2024 14:26
@jaredrethman jaredrethman marked this pull request as ready for review October 21, 2024 14:24
@jaredrethman jaredrethman requested a review from a team as a code owner October 21, 2024 14:24
@jaredrethman jaredrethman added the [Status] Needs Review The issue or pull request needs to be reviewed label Oct 21, 2024
@jaredrethman jaredrethman changed the title Feat/ia settings additional brands feat(ia): settings additional brands Oct 21, 2024
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking great! I've encountered a few issues, which I commented inline.

@jaredrethman
Copy link
Contributor Author

It's looking great! I've encountered a few issues, which I commented inline.

@miguelpeixe thanks for the thorough review. I've refactored & fixed most of your feedback. Let me thoughts on #3462 (comment)

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the revisions! It's looking great!

One small adjustment is needed for the new error handling. It's not getting cleared:

After receiving an error due to duplicate slugs, I adjust my slug name and click save. If edit a brand - the same or any other - the error message is still there.

@jaredrethman
Copy link
Contributor Author

Thank you for all the revisions! It's looking great!

One small adjustment is needed for the new error handling. It's not getting cleared:

After receiving an error due to duplicate slugs, I adjust my slug name and click save. If edit a brand - the same or any other - the error message is still there.

This shouldn't be happening, it should be clearing automatically after a successful subsequent request. I can reproduce, looking into why this is happening, will revert shortly.

@jaredrethman
Copy link
Contributor Author

Thank you for all the revisions! It's looking great!
One small adjustment is needed for the new error handling. It's not getting cleared:
After receiving an error due to duplicate slugs, I adjust my slug name and click save. If edit a brand - the same or any other - the error message is still there.

This shouldn't be happening, it should be clearing automatically after a successful subsequent request. I can reproduce, looking into why this is happening, will revert shortly.

I was mistaken, at one stage this one the plan - at the time it wasn't feasible. Anyway - I have added code that will reset the error on location change 920a27a

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the revisions, Jared! Working great now 💯

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Oct 24, 2024
@jaredrethman jaredrethman merged commit a766df8 into epic/ia Oct 24, 2024
@jaredrethman jaredrethman deleted the feat/ia-settings-additional-brands branch October 24, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants