Skip to content

Conversation

l0uden
Copy link
Contributor

@l0uden l0uden commented Oct 2, 2025

Description

http requests count for set_control action drill_through and interactions

Notice

  • I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

    • I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
    • I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

Copy link
Contributor

github-actions bot commented Oct 2, 2025

View the example dashboards of the current commit live on PyCafe ☕ 🚀

Updated on: 2025-10-02 13:01:53 UTC
Commit: 8f85931

Compare the examples using the commit's wheel file vs the latest released version:

vizro-core/examples/scratch_dev

View with commit's wheel vs View with latest release

vizro-core/examples/dev/

View with commit's wheel vs View with latest release

vizro-core/examples/visual-vocabulary/

View with commit's wheel vs View with latest release

vizro-core/examples/tutorial/

View with commit's wheel vs View with latest release

@l0uden l0uden changed the base branch from main to qa/set_control_action_dom_elements_tests October 2, 2025 13:05
@l0uden l0uden requested a review from petar-qb October 2, 2025 13:05
@l0uden l0uden marked this pull request as ready for review October 2, 2025 13:27
Copy link
Contributor

@petar-qb petar-qb left a comment

Choose a reason for hiding this comment

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

Awesome work, so +1 approval from my side! ✅ 🏅

Comment on lines +207 to +211
# filter interaction between charts (3 http)
element = page.locator('path[class="point plotly-customdata"]').nth(20)
box = element.bounding_box()
page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2)
check_http_requests_count(page, http_requests_paths, 5)
Copy link
Contributor

Choose a reason for hiding this comment

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

When you remove unnecessary custom action from here https://github.com/mckinsey/vizro/pull/1422/files#r2410395577, the number of https will drop 5 -> 4. After that, could you explain here in the comment what happens under the hood so that clicking on the graph triggers two instead of one http request (which is intuitively expected number as one action triggers one http). You can explain that implicit actions chain happens and that set_control implicitly triggers the filter_action.

Comment on lines +224 to +226
# filter interaction between af grid and chart (2 http)
page.get_by_role("gridcell", name="Europe").nth(0).click()
check_http_requests_count(page, http_requests_paths, 4)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add similar comment here.

Comment on lines +239 to +243
# filter drill_through between charts (3 http)
element = page.locator('path[class="point plotly-customdata"]').nth(20)
box = element.bounding_box()
page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2)
check_http_requests_count(page, http_requests_paths, 5)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also add a comment here and in other tests below that explain why 3 http requests happen. (set_control + 2 for on page load that happen while opening a targeted page)


# checking that no additional http has occurred
check_http_requests_count(page, http_requests_paths, 4, sleep=cnst.HTTP_TIMEOUT_LONG)

Copy link
Contributor

Choose a reason for hiding this comment

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

When you add a test(s) for chaining multiple set_control actions (see this comment), could you also include an additional test(s) here to cover that scenario(s)? Actually, that will be the most important http test for the set_control feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants