Repository navigation
Replace jquery.tableHeader.js with CSS position: sticky - #38207
Conversation
Co-authored-by: Antigravity (AI assistant) <noreply@google.com>
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
PR commands & links...
|
|
@vingle the old |
|
Thanks @colemanw - while I've not tested, the PR makes good sense. If I understand right, it's similar to what @shaneonabike was proposing here: https://lab.civicrm.org/dev/core/-/work_items/5221 (which then got closed in favour of a broader tables WIP: https://lab.civicrm.org/extensions/riverlea/-/work_items/98). He did some work before that with a |
|
ACK @vingle good idea to look around at other implementations. Turns out we have 3:
Given all that, the path seems pretty clear to me:
|
|
@mattwire - also ftr, asides from there being an active conversation 'not tested, the PR makes good sense' for me means need to still test. css in Civi can regularly read well but render oddly because of the size.. anything other than linting needs a visual check, which rn is a very manual process. @colemanw - that's a big review… don't think it will be this week. Because of visual regressions with @shaneonabike's Dress Code sample I think it will take a bit of cross-CMS checking and the majority of the templates changed here dble checking. Given that, would it be worth doing a bunch of table-related changes together? Thinking of jfilter's side-scroll PR, and also the Bootstrap classes like |
|
@mattwire - I don't know if it needs reverting. The main problem is this variable To see what I mean, the demo here on Standalone set its at 40px, which looks good in Activity Search:
But in Joomla for some reason it's
Joomla was broken before this, just not as badly. WordPress and some Drupal admin themes will also behave oddly because the position of the Civi container from the top of the viewport isn't consistent across every cms - and position sticky as used here needs an offset from the top of the viewport to avoid hiding behind the top nav. |
|
I've finally tested this in Joomla - it's fixed for Civi Menubar above the Joomla menubar - when before it wasn't working. But if the menubar is moved to below the Joomla menubar, ie…
…then it's broken:
Two things are going wrong:
That can be fixed by (tho that's reseting other civi output so maybe a bit hacky): But not sure what it does on WordPress and the family of Drupal admin themes/menu bars… @colemanw which CMSs have you checked #38215 against? |
|
Well my understanding is that there are specific settings for each CMS? Because we won't ever get a specific setting perfect for each. I recall this was fixed in WP or Drupal before by (me?) by using the actual WP menubar height.. but I would need to check that. So you probably just need to add a specific fix for Joomla now, and then we can test the other CMSs? |
|
@shaneonabike it's being set by crm.menubar.js#L536. There's then a bunch of css overrides of that to reset it to 0 / something else… |
|
Was just about to PR the Joomla fix, but see there's already a fix for |
|
@vingle I'm sorry for the miscommunication but I didn't mean for you to test this PR at all, it's superseded by #38215 which drops the broken |
|
@colemanw - I know, I just wanted to finish testing this PR first as it would (and did) reveal issues with There was another reason - because of PRs being merged before I've finished looking at them, and the arrival of LLM reviewing, I'm a little apprehensive to invest the time to setup the PR on a local Joomla to give it the test it needs (the other CMSs I think can be tested by using the Github action commands to build various CMS demo sites - that I really should make a note of those commands!). |
|
@vingle I think no-one will be merging that other PR without your go-ahead. What can I do to help get it over the line? I've just uploaded a video from my WP site. I could build other local sites and post more videos if that would help. |





Overview
This finally lets us remove an ancient script copied from Drupal6.
The js handled
<thead class="sticky">, this replaces it with pure CSS.cc @vingle