mattermost/server
Scott Bishel c537b88f93
MM-65023 Add tooltip to actions buttons, display error (#33773)
* Add tooltip support and error handling for action buttons

- Add tooltip field to PostAction type definition
- Display tooltips on hover for action buttons
- Add comprehensive error handling for button actions
- Show error messages when actions fail
- Clear previous errors on subsequent actions
- Add tests for error handling functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add E2E tests for action button error handling and tooltips

- Test error message display when action buttons fail
- Test error clearing when successful actions are performed
- Test tooltip display on action button hover
- Use scoped selectors to avoid test interference
- Cover complete error lifecycle and tooltip functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use WithTooltip component for action button tooltips

Replace native HTML title attribute with WithTooltip component to provide
consistent tooltip styling and behavior across the application.

Changes:
- Import and wrap ActionBtn with WithTooltip component
- Remove title attribute from ActionBtn
- Update E2E test to check for .tooltipContainer instead of title attribute

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix TypeScript errors and test patterns in message attachment tests

- Fix TypeScript type errors in mock event objects by using arrow functions instead of jest.fn()
- Update async test pattern to use process.nextTick() with done callback instead of await
- Update test snapshots to reflect error handling wrapper div
- Fix whitespace formatting in E2E test file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>

* updated actionError to accept react node, replace hardcoded error with FormattedMessage components

* Fix test to handle FormattedMessage in actionError state

Update test expectation to check for FormattedMessage React element
instead of plain string when no error message is provided. This aligns
with the recent change to support internationalization in error messages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>

* Disable tooltip interactions when no tooltip text is present

Adds disabled prop to WithTooltip component when action.tooltip is empty or undefined, preventing unnecessary tooltip event handlers from being attached to action buttons that don't have tooltips.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>

* Add tests for action button tooltip behavior

Adds three test cases to verify tooltip functionality:
- Tooltip is disabled when action.tooltip is undefined
- Tooltip is disabled when action.tooltip is empty string
- Tooltip is enabled and displays correctly when action.tooltip has a value

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>

* fix e2e test

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2026-01-26 20:07:09 -07:00
..
bin
build Update runtime chainguard image for fips (#34997) 2026-01-20 23:09:51 +02:00
channels Autotranslations MVP (#34696) 2026-01-26 17:05:34 -05:00
cmd Remove vestigial MySQL support (#34865) 2026-01-20 21:01:59 +00:00
config Remove vestigial MySQL support (#34865) 2026-01-20 21:01:59 +00:00
einterfaces Autotranslations MVP (#34696) 2026-01-26 17:05:34 -05:00
enterprise Autotranslations MVP (#34696) 2026-01-26 17:05:34 -05:00
fips MM-65959: Add FIPS indicator to about dialog (#34463) 2025-12-11 18:37:29 -04:00
fonts
i18n Autotranslations MVP (#34696) 2026-01-26 17:05:34 -05:00
platform Add audits for accessing posts without membership (#31266) 2026-01-20 10:38:27 +01:00
public MM-65023 Add tooltip to actions buttons, display error (#33773) 2026-01-26 20:07:09 -07:00
scripts [MM-67030] Remove newsletter signup and replace with terms/privacy agreement (#34801) 2026-01-23 18:24:27 +00:00
templates MM-59966 - Compliance Export overhaul - feature branch (#29789) 2025-01-10 16:56:02 -05:00
tests Remove vestigial MySQL support (#34865) 2026-01-20 21:01:59 +00:00
.gitignore Update .server/gitignore to ignore all JSON files under the directory (#27593) 2024-07-11 09:12:57 +02:00
.go-version bumps go version to 1.24.11 (#34876) 2026-01-09 17:22:23 +01:00
.golangci.yml MM-62151 avoid select * for post store (#34709) 2026-01-09 18:23:16 +00:00
.sass-lint.yml
config.mk Enabling Prometheus, Grafana, Loki and Promtail running as containers by default in local dev environments (#34263) 2025-10-23 14:08:53 +02:00
copyright.txt
docker-compose.makefile.m1.yml Remove obsolete docker version (#30040) 2025-01-30 12:53:25 -07:00
docker-compose.makefile.yml Explicitly name Postgres container volume (#33954) 2025-10-02 09:29:00 -04:00
docker-compose.pgvector.yml Add support for pgvector in local dev (#33900) 2025-09-15 18:58:43 +00:00
docker-compose.yaml selinux security context fixes in docker compose (#34394) 2025-11-14 17:32:56 +01:00
go.mod update mscfb and msoleps indirect dependencies to fix oom vuln. (#34910) 2026-01-23 23:56:01 +02:00
go.sum update mscfb and msoleps indirect dependencies to fix oom vuln. (#34910) 2026-01-23 23:56:01 +02:00
Makefile Bumping version of prepackaged Gitlab plugin to 1.12.0 (#35033) 2026-01-23 17:41:11 +02:00
path.go Centralize the GetPackagePath (#27004) 2024-05-15 12:05:13 -03:00