Skip to content
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

Newsletter categories: Render non-interactive newsletter category pills in the editor #32666

Merged
merged 9 commits into from
Sep 7, 2023

Commits on Aug 30, 2023

  1. [not verified] Add newsletter categories to subscription block

    Added a new feature to the subscription block which displays newsletter categories. The added categories are styled and displayed above the subscription form. Also added a new hook to query newsletter categories from the backend. This feature enhances user experience by offering categorized subscribing options. The form width is reduced when categories are displayed for better aesthetics.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    a9c0a93 View commit details
    Browse the repository at this point in the history
  2. [not verified] Add newsletter categories to subscription block

    Added a new feature to the subscription block which displays newsletter categories. The added categories are styled and displayed above the subscription form. Also added a new hook to query newsletter categories from the backend. This feature enhances user experience by offering categorized subscribing options. The form width is reduced when categories are displayed for better aesthetics.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    4f48a1c View commit details
    Browse the repository at this point in the history
  3. [not verified] Add 'enabled' state to newsletter category hooks

    The changes introduced a new 'enabled' state to the useNewsletterCategories hook. This was done to allow better manipulation of the subscription blocks based on whether the newsletter category function is enabled by the user or not, hence improving user experience when interacting with subscription blocks.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    d01e838 View commit details
    Browse the repository at this point in the history
  4. [not verified] Remove unnecessary spacing in view.scss

    This commit removes the additional two lines of spacing at the beginning of the view.scss file within the subscriptions block. This was done to clean the code and make it adhering to the standard coding practices, which enhances the readability and maintainability.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    828e269 View commit details
    Browse the repository at this point in the history
  5. [not verified] Add newsletter categories REST API endpoint and adjust…

    … client-side fetch
    
    This commit introduces a new REST API endpoint for retrieving the newsletter categories. The new endpoint will enable a more seamless and effective integration of these categories in the client-side.
    
    Moreover, modifications were also made to the 'trait-wpcom-rest-api-proxy-request-trait.php' file. Now the body for Client::wpcom_json_api_request_as_user is checked if not null. This was done to prevent an error when the body is null.
    
    Lastly, the fetch request at 'use-newsletter-categories.js' has been updated to use the new /newsletter-categories endpoint within the local server environment instead of making a direct request to the public API.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    d8f09c2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4335c2d View commit details
    Browse the repository at this point in the history
  7. [not verified] Add newsletter categories mock function for testing

    In the subscriptions module, a mock function was added in the test/edit.js file. This was done to simulate the behavior of the actual 'useNewsletterCategories' function in the unit tests. This will facilitate the testing process by controlling its response and help in improving the code coverage.
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    fc89c1f View commit details
    Browse the repository at this point in the history
  8. - Better usage of CSS variables

    - Renamed --border-radius to --subscribe-block-border-radius
    - Removed check of WPCOM
    TimBroddin committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    dedf041 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Merge remote-tracking branch 'origin/trunk' into add/subscription-blo…

    …ck-add-newsletter-categories
    jeherve committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    1e8a402 View commit details
    Browse the repository at this point in the history