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

Feat: Updates GA events with category field #2414

Open
wants to merge 155 commits into
base: main
Choose a base branch
from
Open

Conversation

lucvysk
Copy link
Contributor

@lucvysk lucvysk commented Aug 15, 2024

What's the purpose of this pull request?

Hi, as requested per Hearst, the PR updates some GA events.

How it works?

The GA events are sent to: https://tagassistant.google.com/

How to test it?

You can test locally.

Please, consider the following spreadsheet as model: https://docs.google.com/spreadsheets/d/15z0k7NXuh60giUtuALlXuFxAzzP3Sn_fECd5mRzjANE/edit?usp=sharing

Only the events bordered in green are done.

Examples:

image

image

Copy link

vercel bot commented Aug 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview Nov 26, 2024 8:00pm

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@lucvysk lucvysk marked this pull request as ready for review August 15, 2024 20:02
@lucvysk lucvysk requested a review from a team as a code owner August 15, 2024 20:02
@lucvysk lucvysk requested review from eduardoformiga and pedromtec and removed request for a team August 15, 2024 20:02
dependabot bot and others added 12 commits August 19, 2024 20:47
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to
3.0.3.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/braces/commit/74b2db2938fad48a2ea54a9c8bf27a37a62c350d"><code>74b2db2</code></a>
3.0.3</li>
<li><a
href="https://github.com/micromatch/braces/commit/88f1429a0f47e1dd3813de35211fc97ffda27f9e"><code>88f1429</code></a>
update eslint. lint, fix unit tests.</li>
<li><a
href="https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff"><code>415d660</code></a>
Snyk js braces 6838727 (<a
href="https://redirect.github.com/micromatch/braces/issues/40">#40</a>)</li>
<li><a
href="https://github.com/micromatch/braces/commit/190510f79db1adf21d92798b0bb6fccc1f72c9d6"><code>190510f</code></a>
fix tests, skip 1 test in test/braces.expand</li>
<li><a
href="https://github.com/micromatch/braces/commit/716eb9f12d820b145a831ad678618731927e8856"><code>716eb9f</code></a>
readme bump</li>
<li><a
href="https://github.com/micromatch/braces/commit/a5851e57f45c3431a94d83fc565754bc10f5bbc3"><code>a5851e5</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/braces/issues/37">#37</a>
from coderaiser/fix/vulnerability</li>
<li><a
href="https://github.com/micromatch/braces/commit/2092bd1fb108d2c59bd62e243b70ad98db961538"><code>2092bd1</code></a>
feature: braces: add maxSymbols (<a
href="https://github.com/micromatch/braces/issues/">https://github.com/micromatch/braces/issues/</a>...</li>
<li><a
href="https://github.com/micromatch/braces/commit/9f5b4cf47329351bcb64287223ffb6ecc9a5e6d3"><code>9f5b4cf</code></a>
fix: vulnerability (<a
href="https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727">https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727</a>)</li>
<li><a
href="https://github.com/micromatch/braces/commit/98414f9f1fabe021736e26836d8306d5de747e0d"><code>98414f9</code></a>
remove funding file</li>
<li><a
href="https://github.com/micromatch/braces/commit/665ab5d561c017a38ba7aafd92cc6655b91d8c14"><code>665ab5d</code></a>
update keepEscaping doc (<a
href="https://redirect.github.com/micromatch/braces/issues/27">#27</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/micromatch/braces/compare/3.0.2...3.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=braces&package-manager=npm_and_yarn&previous-version=3.0.2&new-version=3.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/vtex/faststore/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) from 1.6.8 to 1.7.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/releases">axios's
releases</a>.</em></p>
<blockquote>
<h2>Release v1.7.4</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>sec:</strong> CVE-2024-39338 (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6543">#6543</a>)
(<a
href="https://github.com/axios/axios/commit/6b6b605eaf73852fb2dae033f1e786155959de3a">6b6b605</a>)</li>
<li><strong>sec:</strong> disregard protocol-relative URL to remediate
SSRF (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)
(<a
href="https://github.com/axios/axios/commit/07a661a2a6b9092c4aa640dcc7f724ec5e65bdda">07a661a</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/levpachmanov"
title="+47/-11 ([#6543](axios/axios#6543)
)">Lev Pachmanov</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/hainenber"
title="+49/-4 ([#6539](axios/axios#6539) )">Đỗ
Trọng Hải</a></li>
</ul>
<h2>Release v1.7.3</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>adapter:</strong> fix progress event emitting; (<a
href="https://redirect.github.com/axios/axios/issues/6518">#6518</a>)
(<a
href="https://github.com/axios/axios/commit/e3c76fc9bdd03aa4d98afaf211df943e2031453f">e3c76fc</a>)</li>
<li><strong>fetch:</strong> fix withCredentials request config (<a
href="https://redirect.github.com/axios/axios/issues/6505">#6505</a>)
(<a
href="https://github.com/axios/axios/commit/85d4d0ea0aae91082f04e303dec46510d1b4e787">85d4d0e</a>)</li>
<li><strong>xhr:</strong> return original config on errors from XHR
adapter (<a
href="https://redirect.github.com/axios/axios/issues/6515">#6515</a>)
(<a
href="https://github.com/axios/axios/commit/8966ee7ea62ecbd6cfb39a905939bcdab5cf6388">8966ee7</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+211/-159
([#6518](axios/axios#6518)
[#6519](axios/axios#6519) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/ValeraS"
title="+3/-3 ([#6515](axios/axios#6515)
)">Valerii Sidorenko</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/prianyu"
title="+2/-2 ([#6505](axios/axios#6505)
)">prianYu</a></li>
</ul>
<h2>Release v1.7.2</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>fetch:</strong> enhance fetch API detection; (<a
href="https://redirect.github.com/axios/axios/issues/6413">#6413</a>)
(<a
href="https://github.com/axios/axios/commit/4f79aef81b7c4644328365bfc33acf0a9ef595bc">4f79aef</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+3/-3
([#6413](axios/axios#6413) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2>Release v1.7.1</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>fetch:</strong> fixed ReferenceError issue when TextEncoder
is not available in the environment; (<a
href="https://redirect.github.com/axios/axios/issues/6410">#6410</a>)
(<a
href="https://github.com/axios/axios/commit/733f15fe5bd2d67e1fadaee82e7913b70d45dc5e">733f15f</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+14/-9
([#6410](axios/axios#6410) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2>Release v1.7.0</h2>
<h2>Release notes:</h2>
<h3>Features</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/blob/v1.x/CHANGELOG.md">axios's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.3...v1.7.4">1.7.4</a>
(2024-08-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>sec:</strong> CVE-2024-39338 (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6543">#6543</a>)
(<a
href="https://github.com/axios/axios/commit/6b6b605eaf73852fb2dae033f1e786155959de3a">6b6b605</a>)</li>
<li><strong>sec:</strong> disregard protocol-relative URL to remediate
SSRF (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)
(<a
href="https://github.com/axios/axios/commit/07a661a2a6b9092c4aa640dcc7f724ec5e65bdda">07a661a</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/levpachmanov"
title="+47/-11 ([#6543](axios/axios#6543)
)">Lev Pachmanov</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/hainenber"
title="+49/-4 ([#6539](axios/axios#6539) )">Đỗ
Trọng Hải</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.2...v1.7.3">1.7.3</a>
(2024-08-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>adapter:</strong> fix progress event emitting; (<a
href="https://redirect.github.com/axios/axios/issues/6518">#6518</a>)
(<a
href="https://github.com/axios/axios/commit/e3c76fc9bdd03aa4d98afaf211df943e2031453f">e3c76fc</a>)</li>
<li><strong>fetch:</strong> fix withCredentials request config (<a
href="https://redirect.github.com/axios/axios/issues/6505">#6505</a>)
(<a
href="https://github.com/axios/axios/commit/85d4d0ea0aae91082f04e303dec46510d1b4e787">85d4d0e</a>)</li>
<li><strong>xhr:</strong> return original config on errors from XHR
adapter (<a
href="https://redirect.github.com/axios/axios/issues/6515">#6515</a>)
(<a
href="https://github.com/axios/axios/commit/8966ee7ea62ecbd6cfb39a905939bcdab5cf6388">8966ee7</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+211/-159
([#6518](axios/axios#6518)
[#6519](axios/axios#6519) )">Dmitriy
Mozgovoy</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/ValeraS"
title="+3/-3 ([#6515](axios/axios#6515)
)">Valerii Sidorenko</a></li>
<li><!-- raw HTML omitted --> <a href="https://github.com/prianyu"
title="+2/-2 ([#6505](axios/axios#6505)
)">prianYu</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.1...v1.7.2">1.7.2</a>
(2024-05-21)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>fetch:</strong> enhance fetch API detection; (<a
href="https://redirect.github.com/axios/axios/issues/6413">#6413</a>)
(<a
href="https://github.com/axios/axios/commit/4f79aef81b7c4644328365bfc33acf0a9ef595bc">4f79aef</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+3/-3
([#6413](axios/axios#6413) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.7.0...v1.7.1">1.7.1</a>
(2024-05-20)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>fetch:</strong> fixed ReferenceError issue when TextEncoder
is not available in the environment; (<a
href="https://redirect.github.com/axios/axios/issues/6410">#6410</a>)
(<a
href="https://github.com/axios/axios/commit/733f15fe5bd2d67e1fadaee82e7913b70d45dc5e">733f15f</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+14/-9
([#6410](axios/axios#6410) )">Dmitriy
Mozgovoy</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/axios/axios/commit/abd24a7367726616e60dfc04cb394b4be37cf597"><code>abd24a7</code></a>
chore(release): v1.7.4 (<a
href="https://redirect.github.com/axios/axios/issues/6544">#6544</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/6b6b605eaf73852fb2dae033f1e786155959de3a"><code>6b6b605</code></a>
fix(sec): CVE-2024-39338 (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6543">#6543</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/07a661a2a6b9092c4aa640dcc7f724ec5e65bdda"><code>07a661a</code></a>
fix(sec): disregard protocol-relative URL to remediate SSRF (<a
href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/c6cce43cd94489f655f4488c5a50ecaf781c94f2"><code>c6cce43</code></a>
chore(release): v1.7.3 (<a
href="https://redirect.github.com/axios/axios/issues/6521">#6521</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/e3c76fc9bdd03aa4d98afaf211df943e2031453f"><code>e3c76fc</code></a>
fix(adapter): fix progress event emitting; (<a
href="https://redirect.github.com/axios/axios/issues/6518">#6518</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/85d4d0ea0aae91082f04e303dec46510d1b4e787"><code>85d4d0e</code></a>
fix(fetch): fix withCredentials request config (<a
href="https://redirect.github.com/axios/axios/issues/6505">#6505</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/92cd8ed94362f929d3d0ed85ca84296c0ac8fd6d"><code>92cd8ed</code></a>
chore(github): update ISSUE_TEMPLATE.md (<a
href="https://redirect.github.com/axios/axios/issues/6519">#6519</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/8966ee7ea62ecbd6cfb39a905939bcdab5cf6388"><code>8966ee7</code></a>
fix(xhr): return original config on errors from XHR adapter (<a
href="https://redirect.github.com/axios/axios/issues/6515">#6515</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/0e4f9fa29077ebee4499facea6be1492b42e8a26"><code>0e4f9fa</code></a>
chore(release): v1.7.2 (<a
href="https://redirect.github.com/axios/axios/issues/6414">#6414</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/4f79aef81b7c4644328365bfc33acf0a9ef595bc"><code>4f79aef</code></a>
fix(fetch): enhance fetch API detection; (<a
href="https://redirect.github.com/axios/axios/issues/6413">#6413</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/axios/axios/compare/v1.6.8...v1.7.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.6.8&new-version=1.7.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/vtex/faststore/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## What's the purpose of this pull request?

create a metatag in build time in order to know when the build was
created.

## How it works?

using the faststore cli we generate a date and insert on store html

## How to test it?

finding the `data-generated-at` metatag on source code.

### Starters Deploy Preview

<!--- Add a link to a deploy preview from `gatsby.store` AND
`nextjs.store` with this branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

## References

<!--- Spread the knowledge: is there any content you used to create this
PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning
people important to this PR may be good for the documentation and
reviewing process --->
#2417 follow-up.

Adds generated-at metatag on source code to identify when the build was
created.
## What's the purpose of this pull request?

- To add the card component. The card component is integral part of the
B2B Self Management design but it's also a generic component and
according to the design team, will be used on things like MyAccount in
the future.


![image](https://github.com/user-attachments/assets/897c55b5-63be-40c6-a8ec-51153c098d81)


[Figma](https://www.figma.com/proto/r3swf1BAZB3yJa9FrgcyXx/Buyer-Organizations-%C2%B7-2024?node-id=128-37169&t=SCMy7ME6H9mqtsiN-0&scaling=min-zoom&page-id=128%3A31910)

## How to test it?

### Starters Deploy Preview


[Preview](https://sfj-8b4430d--b2bfaststoredev.preview.vtex.app/self-management)
[PR on
Starter](vtex-sites/b2bfaststoredev.store#88)

<!--- Add a link to a deploy preview from `gatsby.store` AND
`nextjs.store` with this branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->
## What's the purpose of this pull request?

The `ClientManyProductsQuery` was being fetched twice with almost the
same parameters, the only difference was the
`hasOnlyDefaultSalesChannel` introduced on this
[PR](#2282) and used only by the
`useAuth` hook.
It doesn't need to be sent on the `ClientManyProductsQuery`, only on the
`ValidateSession` mutation.
These other queries were also being affected:
`ClientSearchSuggestionsQuery`, `ClientProductGalleryQuery` and
`ClientProductQuery`.

## How it works?

It filters the `hasOnlyDefaultSalesChannel` key out of the `channel`
object in the `useSession` before sending it on the query.

## How to test it?

Running `yarn dev` and checking on the PDP that the
`ClientManyProductsQuery` is not duplicated and is not sending the
`hasOnlyDefaultSalesChannel` on `channel`.
| Before | After |
| -|-|
| <img width="1167" alt="Screenshot 2024-09-02 at 14 00 24"
src="https://github.com/user-attachments/assets/f697db8f-8bda-434e-bc8d-6685ef2d462b">
| <img width="1169" alt="Screenshot 2024-09-02 at 13 58 30"
src="https://github.com/user-attachments/assets/78f32e0d-18b8-413b-8299-6bd467205b6e">
|
| <img width="1173" alt="Screenshot 2024-09-02 at 14 00 54"
src="https://github.com/user-attachments/assets/f8f673bb-c930-4627-b3e0-f25bb7c1ea39">
| |


### Starters Deploy Preview

<!--- Add a link to a deploy preview from `gatsby.store` AND
`nextjs.store` with this branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

## References

- [Slack
thread](https://vtex.slack.com/archives/C051B6LL91U/p1725284216284089)
## What's the purpose of this pull request?

This PR reverts the following PRs:
- #2307
- #2204

Also, it resolves the conflicts from the current main branch.

## How it works?

We are removing the reload issue caused by the use of fuzzy logic and
operators in handling IS requests.

The team will try another approach to address the usage of fuzzy logic
and operators in IS requests allowing the search engine decide the best
parameters for the search.

## How to test it?

You can run the project locally and double-check if the PLP/Search page
just loads once.
Also, you can use the preview URL from starter PR:
PLP: https://sfj-728d5af--starter.preview.vtex.app/office
Search:
https://sfj-728d5af--starter.preview.vtex.app/s?q=shirt&sort=score_desc&page=0

### Starters Deploy Preview

- vtex-sites/starter.store#517

## References

<!--- Spread the knowledge: is there any content you used to create this
PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning
people important to this PR may be good for the documentation and
reviewing process --->
…2431)

In this PR we add the `show-invisible-items` param to IS api in order to
enhance the invisible SKU
@hellofanny hellofanny added the contributing Pull request submitted by the community label Nov 19, 2024
eduardoformiga and others added 6 commits November 19, 2024 12:07
## What's the purpose of this pull request?

This PR is part of the performance initiative and aims to apply
next/dynamic to BannerText's internal components.

## How to test it?

The pages should render as before, this PR is only to prepare the
components for the time that we're gonna render based on the
ViewportObserver/LazyLoadingSection.

### Starters Deploy Preview

- vtex-sites/starter.store#608

Preview
https://sfj-fc3bf86--starter.preview.vtex.app/

### References
POC PR
- #2404
## What's the purpose of this pull request?

This PR is part of the performance initiative and aims to apply
`next/dynamic` to `CartSidebar` internal components.

## How to test it?

The CartSidebar should render as before. You should see the JS from
internal components loading on demand. This PR is also to prepare the
components for the time that we will render based on the
ViewportObserver/LazyLoadingSection.

### Starters Deploy Preview

- vtex-sites/starter.store#609

Preview
- https://sfj-b6dcbf1--starter.preview.vtex.app/

### References
POC PR
- #2404
## What's the purpose of this pull request?

This PR is part of the performance initiative and aims to split the
global sections into its own file.

Let's initially separate the components of each page type into their own
files; this will help organize the import of components by page type (in
other tasks) and opens up the possibility of only importing customized
components based on the page type in the future, instead of all
components, as we currently do.

The idea is to stop using the `GlobalSections` component in the tree of
each page, but since we are not doing this for all pages yet, we’ll keep
it temporarily. We will only remove the use of this component on the
homepage (in another task). Once we’ve done this for all pages, we can
remove this component entirely, but we will keep the function
`getGlobalSectionsData`.
(packages/core/src/components/cms/GlobalSections.tsx). Global sections
will now be imported into the sections file of each page and passed
directly to `RenderSections`.


### Starters Deploy Preview

- vtex-sites/starter.store#610

Preview
https://sfj-923b60d--starter.preview.vtex.app/

### References
POC PR
- #2404

---------

Co-authored-by: Larícia Mota <[email protected]>
Depends on 
- #2554

## What's the purpose of this pull request?

This PR is part of the performance initiative and aims to split the
homepage sections into its own file.

Let's initially separate the components of each page type into their own
files; this will help organize the import of components by page type (in
other tasks) and opens up the possibility of only importing customized
components based on the page type in the future, instead of all
components, as we currently do.

The idea is to stop using the `GlobalSections` component in the tree of
each page, but since we are not doing this for all pages yet, we’ll keep
it temporarily. We will only remove the use of this component on the
homepage (in another task). Once we’ve done this for all pages, we can
remove this component entirely, but we will keep the function
`getGlobalSectionsData`.
(packages/core/src/components/cms/GlobalSections.tsx). Global sections
will now be imported into the sections file of each page and passed
directly to `RenderSections`.


### Starters Deploy Preview

- vtex-sites/starter.store#611

Preview
https://sfj-edd92b9--starter.preview.vtex.app/

### References
POC PR
- #2404
/**
* Specifies item list name.
*/
list_name?: string
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
list_name?: string
listName?: string

todo: can you please rename it and update all the occurrences? Just to maintain the consistency in the codebase. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got fairly messy because the rebase... But it's done!

Copy link
Contributor

Choose a reason for hiding this comment

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

omggg 🙈
Uploading image.png…

@lucvysk Sorryyy! Do you mind opening a new PR from the main branch with these changes? I’d really appreciate it! 🤩

emersonlaurentino and others added 5 commits November 21, 2024 16:30
## What's the purpose of this pull request?

This PR aims to correct fuzzy and operator usage when handling
Intelligent Search API requests.

Previously, we specified a default value for fuzzy `fuzzy=auto`. But we
shouldn’t include it on the first request to Search. According to the IS
team, the correct behavior should let the search engine decide the best
parameters for the search.

Re-applies changes made from #2204
without adding the blink effect added previously.


- [x] Adds fuzzy & operator parameters in the query
- [x] Avoid re-rendering the page
- [x] Check search PLP (blink issue)
- [x] Check category PLP (blink issue)
- [x] Check duplicate `search.query` event to IS

## How it works?

More details on #2204 description.

## How to test it?

Run the project locally or test though this [preview
link](https://sfj-8636169--starter.preview.vtex.app)

### Testing search PLP

1. Search for `apple` using the input search field
2. Open the `Network Tab` and filter for `ClientProductGalleryQuery`
- In the first request ->`Response` tab: look for `metadata` object, the
`fuzzy` and `logicalOperator` values
<img width="1489" alt="image"
src="https://github.com/user-attachments/assets/3bc1ccf5-65f9-454a-bddf-8fac768007a9">

- Check if the same values is being set in `selectedFacets`
<img width="1227" alt="image"
src="https://github.com/user-attachments/assets/383fcf0b-a616-472f-8266-478e145ebaf0">

- You shouldn't see any blink effect in the page in this scenario:


https://github.com/user-attachments/assets/c92aec29-d089-45d0-a1d0-8bc991c97bb1

### Testing in Category PLP
1. Click on `Technology` category
2. You shouldn't see any blink effect in the page in this scenario

### Duplicate Search event in PLP
1. Search for `apple` using the input search field (at once)
2. Open the `Network Tab` and filter for `event`
3. You shouldn't be able to see the event (with the same url and term)
being send twice
<img width="1574" alt="image"
src="https://github.com/user-attachments/assets/7f0607ac-02cf-4c1d-b201-1cddc5000677">


### Starters Deploy Preview

vtex-sites/starter.store#617

## References

#2204

---------

Co-authored-by: Fanny Chien <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
…#2571)

## What's the purpose of this pull request?

This PR intends to fix the Headless CMS release preview not working due
to missing support for `releaseId` query string param.

## How it works?

With these changes, the function will pick each param, check for missing
(required or optional) ones and filter undefined keys (`versionId` or
`releaseId`).

## How to test it?

On Admin, check some account with existing Release and try opening the
release preview.

### Starters Deploy Preview



## References

[VTEX Headless CMS API
doc](https://developers.vtex.com/docs/api-reference/headless-cms-api#get-/_v/cms/api/-projectId-/-content-type-/-document-id-?endpoint=get-/_v/cms/api/-projectId-/-content-type-/-document-id-)
@hellofanny
Copy link
Contributor

Can you also help us solving the conflicts? Thankss 🙏

@hellofanny hellofanny changed the title Feat/ga events 2 Feat: Updates GA events with category field Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.