Skip to content

Bootstrap 5 #1644

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

Merged
merged 7 commits into from
Nov 10, 2022
Merged

Bootstrap 5 #1644

merged 7 commits into from
Nov 10, 2022

Conversation

Conengmo
Copy link
Member

@Conengmo Conengmo commented Nov 10, 2022

Replaces #1482.

Upgrading to Bootstrap 5 is not trivial, since the Awesome Marker package we use relies on Bootstrap 3 for glyphicons icons. Those are dropped in Bootstrap 4 and 5.

Maintain backwards compatibility by extracting the glyphicons css and fonts from Bootstrap 3 and including them in folium.

This way we can upgrade Bootstrap while still allowing the default icons of Awesome Marker.

TODO in a next one:

include more documentation on what icons are available.

To test this PR

In this PR I already link to the future location of the static css and fonts. If you want to test it locally, change the jsdeliver link to point to my repo and branch: https://cdn.jsdelivr.net/gh/Conengmo/folium@bootstrap-5/folium/templates/bootstrap_3_glyphicons/bootstrap-3-glyphicons.css

@Conengmo
Copy link
Member Author

Conengmo commented Nov 10, 2022

All tests pass when I use the link to this feature branch. Now I'll revert it to use the future link again. Some tests will then fail, but it should be safe to merge.

When merging please squash and merge.

@Conengmo Conengmo requested a review from ocefpaf November 10, 2022 11:01
@Conengmo Conengmo added the ready PR is ready for merging label Nov 10, 2022
@ocefpaf
Copy link
Member

ocefpaf commented Nov 10, 2022

The selenium tests are failing with a 403, any idea of what is going on there?

@Conengmo
Copy link
Member Author

Yes, I included a CDN link to our main branch, so the files are not there yet until this PR is merged. But take a look at the run tests with feature branch commit, there the tests ran with the CDN link to this feature branch, and they passed.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 10, 2022

Yeah. You mentioned that above and I missed it, sorry.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 10, 2022

Yeah. You mentioned that above and I missed it, sorry.

Can we do a permalink or something? I don't recall what is the best practice in this case. I'm OK merging this as-is but I have a feeling we dealt with this in the past.

@Conengmo
Copy link
Member Author

I don't think we solved this in the past... The best way would be to merge the static dependencies first, then do a second PR that uses them. But I guess I took the liberty to cut a corner here 😇

@Conengmo Conengmo merged commit 4e6e6e4 into python-visualization:main Nov 10, 2022
@Conengmo Conengmo deleted the bootstrap-5 branch November 10, 2022 15:17
@Conengmo
Copy link
Member Author

Hmm this did break the Selenium tests on the main branch. Looking into it...

Conengmo added a commit to Conengmo/folium that referenced this pull request Nov 10, 2022
@Conengmo
Copy link
Member Author

Reverting this change in #1648 since there's an issue with how we use the CDN.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 10, 2022

What if we hosted those files in a new repo? We can even versioned them in that approach.

Conengmo added a commit that referenced this pull request Nov 10, 2022
@Conengmo
Copy link
Member Author

Yes, that's probably best!

main should be good now. I'm done for today, maybe more tomorrow. Only 7 PRs still open!

@ocefpaf
Copy link
Member

ocefpaf commented Nov 10, 2022

Only 7 PRs still open!

\o/

@Conengmo Conengmo mentioned this pull request Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants