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

Ensure FileDownload button can be clicked anywhere #5431

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

philippjfr
Copy link
Member

Fixes #5425

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #5431 (96fcca8) into main (970399a) will decrease coverage by 10.73%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main    #5431       +/-   ##
===========================================
- Coverage   83.30%   72.57%   -10.73%     
===========================================
  Files         274      274               
  Lines       40005    40005               
===========================================
- Hits        33325    29035     -4290     
- Misses       6680    10970     +4290     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 72.57% <ø> (-0.05%) ⬇️

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

see 67 files with indirect coverage changes

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

@philippjfr philippjfr merged commit 8224ac6 into main Aug 24, 2023
@philippjfr philippjfr deleted the download_button_fix branch August 24, 2023 14:41
@@ -136,3 +136,10 @@
background-color: var(--light-bg-color);
color: black;
}

.bk-btn a {
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen Aug 24, 2023

Choose a reason for hiding this comment

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

You also need to remove the padding from the button. I.e. set it to 0px. Otherwise the button will get 12px higher than today.

I think you need to make this more specific targetting the FileDownload specifically ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Wouldn't want to delete the padding from the general Button that is true, the .bk-btn a rule is fine because a regular Button doesn't support links inside it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

I did what you did here in beginning resulting in 12px too high button.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is the padding on a needed at all?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It was for me. It aligns the text center vertically. That is also why it was on the button in the first place.

@ltalirz
Copy link
Contributor

ltalirz commented Nov 15, 2024

I find it is still possible to click a button without triggering the callback with panel 1.2.2 that includes this fix (although after this update, the "non-triggering area" is significantly smaller)

Maybe this picture from chrome helps
image

The HTML code with classes is

<button type="bk_btn, bk_btn_type" class="bk-btn bk-btn-primary"><a>Download data.xlsx</a></button>

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.

FileDownload widget is only clickable within Text/label
3 participants