Skip to content

Conversation

andersonjeccel
Copy link
Contributor

@andersonjeccel andersonjeccel commented Apr 2, 2025

Q A
Bug fix? (use the a.b branch)
New feature/enhancement? (use the a.x branch) ✔️
Deprecations?
BC breaks? (use the c.x branch)
Automated tests included?
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes #...

Description

This PR adds a new component to show category when viewing resource details

  • the background color matches the category color
  • the icon automatically appears with enough contrast to ensure visibility (black or white)
Screencast.From.2025-04-02.16-05-38.webm

image

image

It also refactors hardcoded category labels in tables to use a reusable twig template


📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Open Categories
  3. Create a new category assigning a color
  4. Create a resource that can be categorized, such as an email
  5. Set the category when creating
  6. Save & Close to see the details screen
  7. Check the element above the title/resource name

@andersonjeccel andersonjeccel self-assigned this Apr 2, 2025
@andersonjeccel andersonjeccel added T1 Low difficulty to fix (issue) or test (PR) ready-to-test PR's that are ready to test code-review-needed PR's that require a code review before merging user-experience Anything related to related to workflows, feedback, and navigation enhancement Any improvement to an existing feature or functionality labels Apr 2, 2025
@andersonjeccel andersonjeccel added the refactoring The change does not change behavior but improves the code label Apr 2, 2025
@andersonjeccel andersonjeccel moved this to 🦸🏻 Needs 2 tests in Open Source Fridays Apr 2, 2025
@andersonjeccel andersonjeccel moved this to In Progress in UX/UI Tiger Team Apr 2, 2025
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.61%. Comparing base (f2b823e) to head (17b1810).
Report is 24 commits behind head on 7.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                7.x   #14841   +/-   ##
=========================================
  Coverage     65.61%   65.61%           
  Complexity    34951    34951           
=========================================
  Files          2299     2299           
  Lines        140579   140579           
=========================================
+ Hits          92246    92247    +1     
+ Misses        48333    48332    -1     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@kingsedem kingsedem left a comment

Choose a reason for hiding this comment

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

Tested and works as expected.
The Category is now displayed when viewing resource details.

Before:
image

After:
image

@kingsedem kingsedem added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels Apr 4, 2025
Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

I see no issues in the code changes 👍

@escopecz escopecz added this to the 7.0.0-alpha milestone Apr 4, 2025
@escopecz escopecz added code-review-passed PRs which have passed code review user-testing-passed PRs which have been successfully tested by the required number of people. and removed code-review-needed PR's that require a code review before merging pending-test-confirmation PR's that require one test before they can be merged labels Apr 4, 2025
@escopecz escopecz merged commit e3c5b15 into mautic:7.x Apr 4, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in UX/UI Tiger Team Apr 4, 2025
@github-project-automation github-project-automation bot moved this from 🦸🏻 Needs 2 tests to 🥳 Done in Open Source Fridays Apr 4, 2025
@andersonjeccel andersonjeccel deleted the UXUI-144-show-category-when-viewing-resource-details branch April 4, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-review-passed PRs which have passed code review enhancement Any improvement to an existing feature or functionality refactoring The change does not change behavior but improves the code T1 Low difficulty to fix (issue) or test (PR) user-experience Anything related to related to workflows, feedback, and navigation user-testing-passed PRs which have been successfully tested by the required number of people.
Projects
Status: 🥳 Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants