Flicker visible when Sort + Combine CMS collections

My client’s site is showing a quick (<1sec) flicker as the CMS collections combine together and sort. She does not like the flicker. Is there anything I can do to “fix” this? I can’t find anything.

You can see the sort/filter flicker on their cloneable when you refresh the page: CMS Sort + CMS Combine | Attributes

Any suggestions? @Support-Luis

Thank you!

Hey @_theclevernod! We can navigate this issue by adding a loader element that disappears after clicking the sort trigger. If you’d like, please add a loading element that covers the list and I can handle the code to help with this :slight_smile:

Thanks for the reply, @Support-Luis. My client doesn’t want to have any kind of fade in or loader element, unfortunately. Any other options?

I’m afraid there is not much to do, this flicker occurs because the list is sorted after the page is done loading.

What we can try is this snippet

<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmscombine',
    (listInstances) => {
      console.log('cmscombine Successfully loaded!');
      document.querySelector('.fs_cmssort_button').click();
    },
  ]);
</script>

This will click the sort trigger as soon as the CMS Combine script loads.

Thanks @Support-Luis ! I’ll give that a shot and let you know how it goes. :slight_smile:

1 Like