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

fix: remove non-JS list of products #10743

Merged
merged 2 commits into from
Aug 28, 2024
Merged

Conversation

stephanegigandet
Copy link
Contributor

As discussed on the product opener meeting on Monday, this removes the HTML list of products that that is displayed when browsers have turned off Javascript. This is done for performance reasons, to avoid having browsers download the data twice. It also makes the responses smaller and easier to cache.

@stephanegigandet stephanegigandet requested a review from a team as a code owner August 28, 2024 10:11
@github-actions github-actions bot added 🧪 tests Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. Display Lists of products labels Aug 28, 2024
Copy link

sonarcloud bot commented Aug 28, 2024

@stephanegigandet
Copy link
Contributor Author

/update_tests_results

@stephanegigandet stephanegigandet enabled auto-merge (squash) August 28, 2024 13:22
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

I made a suggestion.

Comment on lines +5649 to +5650
# We indent the JSON in the generated HTML so that we can easily see diffs in integration tests outputs
$products_json = $json_indent->encode($request_ref->{structured_response}{products});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines -116 to -127
[% ELSE %]
<li>
[% IF product.product_name == '' %]
<a href="[% product.url %]" title="[% product.code %]">
[% ELSE %]
<a href="[% product.url %]" title="[% product.product_name %]">
[% END %]
<div>[% product.img %]</div>
<span>[% product.product_name %]</span>
</a>
</li>
[% END %]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a message (to make it clear for people not having JS activated in some way):

     [% ELSE %]
       <div>Product list loading from javascript…</div>
     [% END %]

@stephanegigandet stephanegigandet merged commit 6805b9f into main Aug 28, 2024
12 checks passed
@stephanegigandet stephanegigandet deleted the remove-non-js-support branch August 28, 2024 13:58
stephanegigandet pushed a commit that referenced this pull request Sep 11, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.44.0](v2.43.0...v2.44.0)
(2024-09-09)


### Features

* 99 French "indice de durabilité" Label images
([#10734](#10734))
([be46cf8](be46cf8))
* 99 indice de reparabilite logos
([#10748](#10748))
([e2c302b](e2c302b))
* new [taxonomy].extended.json with extended synonyms
([#10744](#10744))
([e1a485e](e1a485e))
* Open folksonomies for all connected users
([#10771](#10771))
([160b792](160b792))
* prepare folksonomy for multi-domain
([#10775](#10775))
([6f8e772](6f8e772))
* script to extract historical data for a field (e.g. Nutri-Score) for a
set of products
([#10408](#10408))
([d40bcf6](d40bcf6))


### Bug Fixes

* block more AI bots
([#10754](#10754))
([852ca5f](852ca5f))
* fix crm sync
([#10747](#10747))
([336647f](336647f))
* import_prod_data not working
([#10750](#10750))
([a895cd3](a895cd3)),
closes
[#10749](#10749)
* remove non-JS list of products
([#10743](#10743))
([6805b9f](6805b9f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Display Lists of products 🚅 Performance Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants