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

🔧 MAINT: Make a more specific selector for no-border #344

Merged
merged 3 commits into from
Aug 6, 2021

Conversation

akhmerov
Copy link
Contributor

@akhmerov akhmerov commented Aug 6, 2021

closes #287

The original problem was that wildcard CSS leaks, and it's hard to override. Unfortunately, it isn't completely clear to me what the wildcard was supposed to catch in the first place (the description in the source was vague and #287 lacked this info). To figure it out I removed the wildcard and compared the outputs, taking the jupyterbook repo. The proposed change seems to fix the problem with preformatted outputs.

Without wildcard:

image

image

With the proposed change:

image

image

Identical to the original, as far as I can tell. If I overlooked other problems, do let me know.

@welcome
Copy link

welcome bot commented Aug 6, 2021

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@choldgraf
Copy link
Member

Thanks for looking into this - I think that the rest case for this would be using a code cell that generates output with it's own CSS, and confirming that it is not overridden. Did you confirm that as well?

Also I've just enabled precommit ci on this repo so it should fix the jobs when you push another commit

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

Thanks for looking into this - I think that the rest case for this would be using a code cell that generates output with it's own CSS, and confirming that it is not overridden. Did you confirm that as well?

I did. Don't have a screenshot at hand (my book is rebuilding rn and it takes some time), but I am using holoviews, and its UI now renders correctly.

Also I've just enabled precommit ci on this repo so it should fix the jobs when you push another commit

The errors seem to be in Python, which I didn't touch. Plus precommit seems to pass; are you sure that's the problem?

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

I pushed another commit for a good measure.

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

Yup, pretty sure the problems aren't mine.

@choldgraf
Copy link
Member

ah yeah you're right - it looks like the tests are failing on master as well because of a change in how the error messages are in the notebooks. will have to figure that out first, sorry about the noise.

@chrisjsewell
Copy link
Member

The errors seem to be in Python, which I didn't touch.

Yeh I guess its related to executablebooks/jupyter-cache#70; a package (I'm not sure what one) dropped ipykernel as a direct dependency, which in-turn allowed a newer version of ipykernel to be installed.

We should probably update the tests to handle this new error message format, and also maybe pin the ipykernel version in the testing extra

@chrisjsewell
Copy link
Member

The ipykernel now being installed is ipykernel-6.0.3, whereas previously it was ipykernel-5.5.5, so the easiest thing would be to just add ipykernel~=5.5 to the testing extra

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

OK, I'll rebase as soon as #347 is merged.

@codecov
Copy link

codecov bot commented Aug 6, 2021

Codecov Report

Merging #344 (1739c7e) into master (27e9aee) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #344   +/-   ##
=======================================
  Coverage   87.43%   87.43%           
=======================================
  Files          12       12           
  Lines        1337     1337           
=======================================
  Hits         1169     1169           
  Misses        168      168           
Flag Coverage Δ
pytests 87.43% <ø> (ø)

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


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27e9aee...1739c7e. Read the comment docs.

@choldgraf
Copy link
Member

ok cool - master is fixed and merged into here...is this one ready to go @akhmerov ?

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

To the best of my understanding, yes.

As I wrote initially, I can't be fully certain what the wildcard was supposed to catch. The jupyterbook repo itself looks all good, so at least most things should work well.

@choldgraf
Copy link
Member

my intuition is that it's better to have a more restrictive policy that breaks in ways that are easier to debug, rather than a less-restrictive policy that breaks in ways that are hard to debug, so I'd be +1 on just merging this I think

@akhmerov
Copy link
Contributor Author

akhmerov commented Aug 6, 2021

I completely agree, let's merge! Just don't want to oversell the content 🙃

@choldgraf choldgraf changed the title make a more specific selector for no-border 🔧 MAINT: Make a more specific selector for no-border Aug 6, 2021
@choldgraf choldgraf merged commit b132a50 into executablebooks:master Aug 6, 2021
@welcome
Copy link

welcome bot commented Aug 6, 2021

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

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.

CSS for cell outputs is too aggressive
3 participants