r-lib / styler

Non-invasive pretty printing of R code
https://styler.r-lib.org
Other
703 stars 70 forks source link

Use Bootstrap 5 template for pkgdown website #1209

Closed IndrajeetPatil closed 2 months ago

IndrajeetPatil commented 2 months ago

BS3 is being deprecated in pkgdown.

But, even if that were not the case, the website has a lot to gain from this switch, and not much to lose (I recall you not being happy with the search feature). The BS3 look is quite cumbersome (e.g. try reading this vignette on mobile browser).

jayhesselberth commented 2 months ago

Is docsearch somehow incompatible with BS5 in pkgdown? I don't think that is intended. But maybe you wanted to use the built-in search anyway.

lorenzwalthert commented 2 months ago

For reference: https://github.com/r-lib/pkgdown/issues/1960

Indeed I don’t like the default search. Is there another way to do search? What is docsearch?

jayhesselberth commented 2 months ago

Got it. Docsearch is Algolia's product: https://docsearch.algolia.com/

Looks like you'll have to choose between BS5 and docsearch. I recommend the former as BS5 support will only continue to improve.

Not sure what it is you don't like about the default search, but the search results from fuse.js — the default pkgdown search — could likely be spruced up with some CSS modifications.

lorenzwalthert commented 2 months ago

Looks like you'll have to choose between BS5 and docsearch. I recommend the former as BS5 support will only continue to improve.

Yeah, I guess that's what we have to do.

Not sure what it is you don't like about the default search, but the search results from fuse.js — the default pkgdown search — could likely be spruced up with some CSS modifications.

Oh, great, are you interested to contribute those for {styler} or upstream in {pgkdown}? :D

lorenzwalthert commented 2 months ago

Not sure what it is you don't like about the default search, but the search results from fuse.js — the default pkgdown search — could likely be spruced up with some CSS modifications.

@jayhesselberth, any interest? Otherwise I think we'll merge as is.

jayhesselberth commented 2 months ago

I suggest merging as-is. The next release of pkgdown will have some major improvements for BS5 sites.

lorenzwalthert commented 2 months ago

Also, @IndrajeetPatil, can you please make sure that after the merge, the dev docs display as expected on mobile and desktop?

IndrajeetPatil commented 2 months ago

Also, @IndrajeetPatil, can you please make sure that after the merge, the dev docs display as expected on mobile and desktop?

Yes, will check once the websites are built.

IndrajeetPatil commented 2 months ago

Things mostly look good, except the navbar is a bit too big. But I'd like to address this after the next pkgdown release, which is going to contain many big changes.

We could also consider using devel-pkgdown to build the website.

lorenzwalthert commented 2 months ago

Yeah let's wait then.