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

Add BrowserInfo model to expose browser window and navigator APIs #4533

Merged
merged 9 commits into from Apr 5, 2023

Conversation

philippjfr
Copy link
Member

Provides various pieces information about the browser.

  • dark_mode: Whether the user prefers dark mode.
  • device_pixel_ratio: Provides the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.
  • language: The preferred language of the user, usually the language of the browser UI.
  • timezone: The timezone configured as the local timezone of the user.
  • timezone_offset: The time offset from UTC in minutes.
  • webdriver: Indicates whether the user agent is controlled by automation.

@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #4533 (ded8dca) into main (587e0c4) will increase coverage by 9.70%.
The diff coverage is 70.61%.

@@            Coverage Diff             @@
##             main    #4533      +/-   ##
==========================================
+ Coverage   73.64%   83.34%   +9.70%     
==========================================
  Files         255      258       +3     
  Lines       36823    36944     +121     
==========================================
+ Hits        27117    30791    +3674     
+ Misses       9706     6153    -3553     
Flag Coverage Δ
ui-tests 39.65% <47.93%> (?)
unitexamples-tests 73.39% <62.88%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/tests/ui/io/test_convert.py 95.86% <ø> (+80.99%) ⬆️
panel/tests/widgets/test_tables.py 99.89% <ø> (ø)
panel/config.py 55.76% <22.22%> (-0.58%) ⬇️
panel/viewable.py 66.22% <51.47%> (-1.56%) ⬇️
panel/io/browser.py 73.17% <73.17%> (ø)
panel/tests/ui/io/test_browser.py 83.33% <83.33%> (ø)
panel/io/state.py 70.81% <93.33%> (+0.57%) ⬆️
panel/template/base.py 78.37% <95.23%> (+0.40%) ⬆️
panel/io/convert.py 73.30% <100.00%> (+47.41%) ⬆️
panel/io/notebook.py 42.62% <100.00%> (ø)
... and 3 more

... and 40 files with indirect coverage changes

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

@MarcSkovMadsen
Copy link
Collaborator

Just for info. Dash just added a Geolocation component.

panel/config.py Show resolved Hide resolved
@philippjfr philippjfr merged commit 50ba78a into main Apr 5, 2023
14 of 15 checks passed
@philippjfr philippjfr deleted the browser_api branch April 5, 2023 10:22
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.

None yet

3 participants