Bug 29604 - Term highlighting adds unwanted pseudo element in the contentblock of OPAC details page
Summary: Term highlighting adds unwanted pseudo element in the contentblock of OPAC de...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-30 16:32 UTC by Lucas Gass
Modified: 2022-02-07 11:50 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.02,21.05.08


Attachments
example (90.70 KB, image/png)
2021-11-30 16:32 UTC, Lucas Gass
Details
Bug 29604: Dont add psuedo content to highlighted terms (1.28 KB, patch)
2021-12-02 02:05 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 29604: Dont add psuedo content to highlighted terms (1.33 KB, patch)
2021-12-03 15:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29604: Dont add psuedo content to highlighted terms (1.39 KB, patch)
2021-12-18 23:15 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2021-11-30 16:32:29 UTC
Created attachment 128111 [details]
example

To recreate:

1. Do a search that will give you lots of term highlighting, I just searched for 'e' in koha-testing-docker.
2. Go to a record with some MARC 505 notes, this HTML element is 'contentblock'. 
3. Notice the CSS pseudo element with this property 'content: "→ ";'
4. The very first time you see a match in the term highlight ( in my case 'e'), the → is added. 

This is because of this:


.contentblock :first-child::before {
    content: "→ ";
}
Comment 1 Lucas Gass 2021-12-02 02:05:07 UTC
Created attachment 128146 [details] [review]
Bug 29604: Dont add psuedo content to highlighted terms

To test:
1. Do a search for something where the search terms will be in the 505 note.
2. Visit the OPAC detail page of the record.
3. The first occurance of the term highlighting will include the CSS pseduo element "→ ";
4. Apply patch
5. Do the stuff to regenerate the CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
6. Do 1 & 2 again.
7. No weird psuedo element in the term highlighting
Comment 2 Owen Leonard 2021-12-03 15:12:16 UTC
Created attachment 128226 [details] [review]
Bug 29604: Dont add psuedo content to highlighted terms

To test:
1. Do a search for something where the search terms will be in the 505
   note.
2. Visit the OPAC detail page of the record.
3. The first occurance of the term highlighting will include the CSS
   pseduo element "→ ";
4. Apply patch
5. Do the stuff to regenerate the CSS
   (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
6. Do 1 & 2 again.
7. No weird psuedo element in the term highlighting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2021-12-18 23:15:12 UTC
Created attachment 128706 [details] [review]
Bug 29604: Dont add psuedo content to highlighted terms

To test:
1. Do a search for something where the search terms will be in the 505
   note.
2. Visit the OPAC detail page of the record.
3. The first occurance of the term highlighting will include the CSS
   pseduo element "→ ";
4. Apply patch
5. Do the stuff to regenerate the CSS
   (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
6. Do 1 & 2 again.
7. No weird psuedo element in the term highlighting

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Fridolin Somers 2022-01-04 06:59:41 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 5 Kyle M Hall 2022-01-07 11:15:09 UTC
Pushed to 21.11.x for 21.11.02
Comment 6 Andrew Fuerste-Henry 2022-01-10 15:46:49 UTC
Pushed to 21.05.x for 21.05.8
Comment 7 Victor Grousset/tuxayo 2022-02-07 11:50:23 UTC
Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed.