Page MenuHomePhorge

Remove unused anchor-target CSS for Conpherence message pane
Needs ReviewPublic

Authored by aklapper on Tue, May 6, 20:06.

Details

Reviewers
None
Group Reviewers
O1: Blessed Committers
Summary

Remove unused CSS selectors related to anchor-target which do not get applied due to missing a whitespace.
Even when making them apply, they do not add any value apart from a small yellow square placed in an unhelpful spot.

See also https://we.phorge.it/D25992 for gory details.

Test Plan

Go to a Conpherence chat via an anchor link like Z1#10, inspect HTML's CSS classes for messages at top of the room (setting policy etc) and also posted chat messages themselves. See no visual differences.

Diff Detail

Repository
rP Phorge
Branch
cssConphTypo (branched from master)
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2021
Build 2021: arc lint + arc unit

Event Timeline

aklapper requested review of this revision.Tue, May 6, 20:06

The CSS rule has never been applied. After the change it will be. Please help by adding a line in the test plan about how to reproduce it if you have some time 🙏

Edited: I mean that the new CSS rule can cause an unwanted result, better to do not blindly approve

Makes sense. The only mention of anchor-target I can (and could at the time of introducing that CSS) can find is in webroot/rsrc/js/core/behavior-watch-anchor.js but still clueless how to ever trigger that in conpherence - it's related to an anchor link like Z2#26 but that doesn't have the parent classes of the CSS selector.

These selectors currently do not get applied at all in Conpherence rooms when opening or creating URIs with anchors.

To make these selectors applied (including the one above about background: {$lightyellow};), they'd require an additional whitespace:

.conpherence-transaction-view.conpherence-comment .anchor-target
.conpherence-transaction-view.conpherence-edited .anchor-target

which shows that they don't make much sense, so best to remove them (and yes there are many more unused selectors in Conpherence):

Screenshot From 2025-05-32 25-16-35.png (975×1 px, 282 KB)

Screenshot From 2025-05-32 25-17-13.png (975×1 px, 268 KB)

Screenshot From 2025-05-32 25-17-23.png (975×1 px, 263 KB)

aklapper retitled this revision from Conpherence message pane CSS: Fix typo in selector name to Remove unused anchor-target CSS for Conpherence message pane.Wed, May 28, 14:31

remove unused CSS as it's also unhelpful CSS when actually used

aklapper edited the test plan for this revision. (Show Details)