Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Show Slur Metadata Feature #625

Closed
Tracked by #626
aatmanvaidya opened this issue Nov 12, 2024 · 2 comments
Closed
Tracked by #626

Enhance Show Slur Metadata Feature #625

aatmanvaidya opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request level:feature An issue that describes a feature (initiative>feature>ticket) plugin priority:high role:frontend

Comments

@aatmanvaidya
Copy link
Collaborator

In the current implementation of the show slur metadata feature, we are inserting a svg icon next to a slur and when a user hovers over it, some metadata is displayed.

The Issue

Since we are inserting the icon in a span tag (for the icon) after the slur word, this is breaking the formatting and structure of text on many websites like Reddit, Instagram, etc.

Proposed Solution

Instead of having the svg icon we can fill the slur world with a feather blur, and when user hovers over it, metadata should be shown.
@dennyabrain has created a demo image of how the feature should look here - #607 (comment)

Code Changes

locateSlur() function identifies all the slur words in the page and inserts the icon in a span tag next to the word.

addMetaData() function helps show the metadata when we hover over it.

Code changes would mostly be required in these two functions only.

@aatmanvaidya aatmanvaidya added enhancement New feature or request plugin priority:high role:frontend level:feature An issue that describes a feature (initiative>feature>ticket) labels Nov 12, 2024
@aatmanvaidya aatmanvaidya moved this to Todo in 2024 Q4 Planner Nov 12, 2024
@dennyabrain
Copy link
Contributor

dennyabrain commented Nov 12, 2024

@maanasb01 I had prototyped the css to achieve something like the effect I drew in that image. Sharing it if its helpful

background-color: #ffde2155;
box-shadow: 0px 0px 5px #ffde21;

You can achieve the look however you want in CSS. The only thing to note is don't use a style that affects the layout in any way. For instance, adding padding or margin etc. As long as its something that the browser's CSS renderer can handle without affecting the layout of the webpage, we are good.

@maanasb01
Copy link
Collaborator

Hey @dennyabrain Thanks for the information! I will keep that in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request level:feature An issue that describes a feature (initiative>feature>ticket) plugin priority:high role:frontend
Projects
Status: Done
Development

No branches or pull requests

3 participants