Skip to content

refactor: stop persisting inline HTML for status change activity notes#713

Open
anonymoususer72041 wants to merge 3 commits intoopencats:masterfrom
anonymoususer72041:refactor/activity-status-highlighting
Open

refactor: stop persisting inline HTML for status change activity notes#713
anonymoususer72041 wants to merge 3 commits intoopencats:masterfrom
anonymoususer72041:refactor/activity-status-highlighting

Conversation

@anonymoususer72041
Copy link
Copy Markdown
Contributor

Summary

This PR stops persisting inline HTML markup for status change activity notes and cleans existing stored notes via a schema upgrade to remove previously persisted inline highlight markup.

Motivation

Persisting presentation markup in the database mixes data and UI concerns, makes future styling changes harder and can cause inconsistent output across different views and exports. By storing plain text and removing legacy markup during upgrade, we keep activity notes clean and ensure consistent, maintainable rendering going forward.

@anonymoususer72041 anonymoususer72041 force-pushed the refactor/activity-status-highlighting branch 2 times, most recently from 1b57f6d to f4fc377 Compare February 20, 2026 13:49
@anonymoususer72041 anonymoususer72041 force-pushed the refactor/activity-status-highlighting branch from f4fc377 to 319ad64 Compare April 22, 2026 06:13
Copy link
Copy Markdown
Member

@RussH RussH 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 the PR — this looks good (as always!), but on a more detailed review I found a couple of niggles I’d like fixed before merging:

The new highlighting helper is only applied in some activity views (candidates/Show.tpl, contacts/Show.tpl, activity/Search.tpl), but not all of them. For example, companies/Show.tpl still renders notes without the helper, so after the schema cleanup the orange status emphasis will disappear there.

There may be a double-escaping issue. In CandidatesUI.php the status change note is already passed through htmlspecialchars() before storage, and the new helper escapes again on output. That could display entities incorrectly for statuses containing special characters?

Please take a look and let me know.

@anonymoususer72041
Copy link
Copy Markdown
Contributor Author

anonymoususer72041 commented Apr 22, 2026

I think we should mark this PR as draft for now.

I just found out that #702 is not working properly for Candidate Activities and still has problems with HTML entities, so I think we should fix this first before we continue work on this PR.

@anonymoususer72041 anonymoususer72041 marked this pull request as draft April 22, 2026 12:08
@anonymoususer72041
Copy link
Copy Markdown
Contributor Author

@RussH once #757 lands into master, I will rebuild this PR.

@RussH
Copy link
Copy Markdown
Member

RussH commented Apr 29, 2026

@anonymoususer72041 #757 has been merged.

@anonymoususer72041 anonymoususer72041 force-pushed the refactor/activity-status-highlighting branch from 319ad64 to 21e8484 Compare April 29, 2026 09:45
@anonymoususer72041
Copy link
Copy Markdown
Contributor Author

@RussH can you merge #761 first, please?

@anonymoususer72041 anonymoususer72041 force-pushed the refactor/activity-status-highlighting branch from f683762 to 74c0246 Compare May 1, 2026 11:40
@anonymoususer72041 anonymoususer72041 marked this pull request as ready for review May 1, 2026 12:27
@anonymoususer72041 anonymoususer72041 requested a review from RussH May 1, 2026 12:28
@anonymoususer72041
Copy link
Copy Markdown
Contributor Author

@RussH can you take a special look on 74c0246, please?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants