Skip to content

Document Segment detail stat cards and source: contact search filter#786

Open
promptless-for-oss wants to merge 3 commits into
mautic:7.2from
Promptless:promptless/segment-source-contact-cards-7.2
Open

Document Segment detail stat cards and source: contact search filter#786
promptless-for-oss wants to merge 3 commits into
mautic:7.2from
Promptless:promptless/segment-source-contact-cards-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open this suggestion in Promptless to view citations and reasoning process

Adds a "Viewing a Segment's statistics" section to manage_segments.rst documenting the Segment detail view stat cards (Total, Active, Manually added, and Filter added contacts), and documents the new source:manually_added / source:filter_added contact search filters (used together with segment:) in search_operators.rst. Covers mautic/mautic PR #16350 (UXUI-278).

Trigger Events


Tip: Send Promptless a meeting transcript in Slack to generate doc updates 📝

Add a 'Viewing a Segment's statistics' section covering the Total,
Active, Manually added, and Filter added contact cards on the Segment
detail view, and document the new source:manually_added /
source:filter_added contact search filters (used with segment:).

Refs mautic/mautic#16350 (UXUI-278)

.. vale on

When you open a Segment, the detail view shows a row of stat cards that summarize its membership. Each card shows a count and links to the Contacts interface filtered to those Contacts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Documented the Segment detail stat cards from PR #16350. The card set and the filter-only Filter added contacts card come from List/details.html.twig (segmentCards built with the list.filters is not empty guard), and the descriptions of the Manually added contacts and Filter added contacts cards come from the tooltip strings mautic.lead.segments.manually.added.contacts.tooltip and mautic.lead.segments.filter.added.contacts.tooltip in Translations/en_US/messages.ini.

Source: mautic/mautic#16350


.. note::

Combine the ``source:`` filter with the ``segment:`` filter to break down a Segment's membership by how Contacts joined it. ``source:manually_added`` returns Contacts added manually, including those who subscribed through the Preference Center, and ``source:filter_added`` returns Contacts that Mautic added automatically based on the Segment's filter rules. On its own, without a ``segment:`` filter, ``source:`` returns no results.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Documented the source:manually_added / source:filter_added contact search filters from PR #16350. The source: command handling in LeadRepository::addSearchCommandWhereClause shows it scopes to the active segment: context and returns no results when no segment is in the query, and the user-facing description string mautic.lead.lead.searchcommand.source.description in Translations/en_US/messages.ini states "Use together with segment:alias. Valid values: manually_added, filter_added".

Source: mautic/mautic#16350

@adiati98 adiati98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@promptless-for-oss there are a few things:

  • please address the suggestions.
  • add an image after line 61. Name it segment_contacts_stat_cards.png and give a descriptive alt text. Use the image in the descripition of the trigger PR.

Comment thread docs/segments/manage_segments.rst Outdated
Address @adiati98 review on PR mautic#786: apply suggested wording/structure
for the Segment stat-card bullet list and add segment_contacts_stat_cards.png
after the section intro.
@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @adiati98 — both addressed and pushed to this branch:

  1. Applied your suggested wording/structure for the stat-card bullet list in manage_segments.rst, including the .. vale off / .. vale on wrapping and the - bullet separators.
  2. Added the screenshot segment_contacts_stat_cards.png (from mautic/mautic#16350) in the "Viewing a Segment's statistics" section, right after the intro paragraph. Alt text: "Segment detail view showing four stat cards - Total contacts, Active contacts, Manually added contacts, and Filter added contacts - each with a count." The image is stored at docs/segments/images/segment_contacts_stat_cards.png, matching the existing local-image convention used elsewhere in that file.

Vale is clean on the edited lines (the one suggestion-severity note on the alt text was intentionally kept to mirror the literal UI card labels in the screenshot).

Comment thread docs/segments/manage_segments.rst Outdated

.. image:: images/segment_contacts_stat_cards.png
:width: 700
:alt: Segment detail view showing four stat cards - Total contacts, Active contacts, Manually added contacts, and Filter added contacts - each with a count.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Address the vale warnings:

  • [Mautic.FeatureList] Is this referring to a Mautic feature? If so, use 'Contacts' instead of 'contacts'.

@promptless-for-oss

Copy link
Copy Markdown
Contributor Author

Thanks @adiati98 — addressed the Vale warning.

The [Mautic.FeatureList] finding was firing on the stat-cards image alt text, which used lowercase "contacts". I reworded the alt text so "Contacts" is capitalized as the Mautic feature while keeping the description accurate.

I left the bullet labels (**Total contacts**, **Manually added contacts**, etc.) as-is on purpose — those reproduce the literal UI card labels verbatim (Mautic renders them in sentence case, confirmed against source PR #16350), and they're already wrapped in .. vale off so Vale won't flag them.

Vale now reports 0 findings on the added stat-cards section. The branch is updated and pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants