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

Sync WidgetFilter with url #491

Merged
merged 8 commits into from
Oct 31, 2023
Merged

Sync WidgetFilter with url #491

merged 8 commits into from
Oct 31, 2023

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Oct 30, 2023

Using the Palmer Penguins example with two updates

config:
  title: Palmer Penguins
  theme: dark
  layout: tabs
  sync_with_url: true   # UPDATED
sources:
  penguins:
    type: file
    cache_dir: ./cache
    tables:
      penguins: https://datasets.holoviz.org/penguins/v1/penguins.csv
pipelines:
  penguins:
    source: penguins
    table: penguins
    filters:
      species:
        type: widget
        field: species
        default: ['Adelie']     # UPDATED
      island:
        type: widget
        field: island
      sex:
        type: widget
        field: sex
      expr:
        type: param
        parameter: scatter.selection_expr
layouts:
  - title: Plots
    pipeline: penguins
    views:
      scatter:
        type: hvplot
        kind: points
        x: bill_length_mm
        y: bill_depth_mm
        color: species
        responsive: true
        height: 350
        selection_group: penguin
      depth_hist:
        type: hvplot
        kind: hist
        y: bill_length_mm
        responsive: true
        height: 350
        selection_group: penguin
      length_hist:
        type: hvplot
        kind: hist
        y: bill_depth_mm
        responsive: true
        height: 350
        selection_group: penguin
      mass_hist:
        type: hvplot
        kind: hist
        y: body_mass_g
        responsive: true
        height: 350
        selection_group: penguin
    layout: [[scatter], [depth_hist, length_hist, mass_hist]]
    sizing_mode: stretch_width
    height: 800
  - title: Table
    pipeline: penguins
    views:
      table:
        type: table
        layout: fit_data_fill
        show_index: false
        theme: midnight
        sizing_mode: stretch_both
    sizing_mode: stretch_width

@hoxbro
Copy link
Member Author

hoxbro commented Oct 30, 2023

I can see test_dashboard_with_url_sync_filters fails. Unfortunately, the test suite is sensitive to the run order, making it harder to debug.

pytest lumen/tests -k test_dashboard_with_url_sync_filters will fail

@hoxbro hoxbro marked this pull request as draft October 31, 2023 09:05
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2023

Codecov Report

Merging #491 (5de7569) into main (9582c8f) will increase coverage by 0.18%.
The diff coverage is 97.43%.

@@            Coverage Diff             @@
##             main     #491      +/-   ##
==========================================
+ Coverage   69.18%   69.36%   +0.18%     
==========================================
  Files          79       79              
  Lines        9092     9128      +36     
==========================================
+ Hits         6290     6332      +42     
+ Misses       2802     2796       -6     
Files Coverage Δ
lumen/tests/test_dashboard.py 100.00% <100.00%> (ø)
lumen/views/base.py 65.05% <100.00%> (+0.35%) ⬆️
lumen/filters/base.py 71.24% <87.50%> (+0.90%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hoxbro
Copy link
Member Author

hoxbro commented Oct 31, 2023

To test the location sync, we should set up UI tests to verify that the front end does not update the app location.

I have added some tests, but they also passed before the changes. I checked by serving the dashboard.

@hoxbro hoxbro marked this pull request as ready for review October 31, 2023 11:10
@philippjfr philippjfr merged commit 592e75b into main Oct 31, 2023
10 checks passed
@philippjfr philippjfr deleted the urlsync_widgets branch October 31, 2023 14:33
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants