You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discussion about Bootstrap v4 and how to implement it [was Feature request: avoid using zoom property] #1655
Thanks for all the feedback lately. Are you actually using showcase mode for your own purposes? Just curious--we didn't think anybody outside of our team, and maybe other Shiny educators, would even think about it.
Basically when a page loads, <td id="showcase-sxs-code" class="showcase-sxs-code-collapsed" style=""> gets loaded with display: hidden; (automatically) resulting into the code panel (tabs + content) not being shown. :(
Have you considered putting the bootstrap 4 functions in a separate package
and renaming them (i.e. adding bs4_ prefix or something)? Rather than
maintaining a fork of Shiny itself?
This goes back to the issue #1604.
(to answer your question: no, i did not)
Could you please give an example? If I understand correctly, I would create a new package abc and this would contain many of the new methods that apply to the bootstrap v4. Good so far.
But what do I do with upgrade of dependencies (in www folder and e.g. description file), changes to javascript & css files etc. The reason why I do a full fledged fork is because I need to access all files in current shiny in addition to the fact that I also do not consider any kind of backwards compatibility - existing apps e.g. in shiny-examples repo should work with only minimal changes. Especially not with the old browsers e.g. IE8/9/10. Simply because bootstrap v4 doesnt take them into account either (even though some other js libraries do).
Plus there are many changes, sometimes even to logic, e.g. to maintain active tabs/pills.
So the idea (one idea) would be that Shiny wouldn't change at all, fluidPage would always load BS3 and that's that. But if the user wants to use Bootstrap 4, then they use bs4_fluidPage from your package, which would load your package's copy of Bootstrap 4. If they use bs4_selectInput, then they get your package's copy of selectize and your input binding.
The problem with a full-fledged fork as you've done, is that you can never put such a package on CRAN, and therefore no package that is on CRAN can ever take a dependency on your work.
On the other hand, building a new Bootstrap 4 package that stands independent of the Shiny package but integrates with it perfectly, is a lot of work, and I just assumed nobody outside of our team would have the desire to actually build and support such a package. But the downside of waiting for us to do it is, well, you might be waiting for a while--we've got some big Shiny projects keeping us busy right now.
The other thing to recognize is that Bootstrap 4 may be fundamentally incompatible with R Markdown themes and output formats that have depended strongly on Bootstrap 3 for a long time. And also with Shiny apps that include custom CSS that target Bootstrap 3.
It's a hard problem without a lot of great solutions...
Let's go step by step to make sure I understand 100% what you mean :)
So the idea (one idea) would be that Shiny wouldn't change at all, fluidPage would always load BS3 and that's that. But if the user wants to use Bootstrap 4, then they use bs4_fluidPage from your package, which would load your package's copy of Bootstrap 4. If they use bs4_selectInput, then they get your package's copy of selectize and your input binding.
The problem with a full-fledged fork as you've done, is that you can never put such a package on CRAN, and therefore no package that is on CRAN can ever take a dependency on your work.
Not even after I would rename it to something like nicelyV4 or shiny2? (question is honest - really dont know). Anyway, it would take a huge time/coding effort until it can be released there, so not a concern for me now. :)
Bootstrap 4 may be fundamentally incompatible with R Markdown themes and output formats that have depended strongly on Bootstrap 3 for a long time
Hmm, thanks for mentioning it 👍 I didnt know rmarkdown uses bootstrap v3 as well.
But, yeeh, I expect that to be sometimes the case.
Generally, what I saw, is that 80% of time you can work with find-all - replace all
shinybootstrap2 took the withBootstrap2 approach because the goal was to allow Shiny users to opt into the old behavior with minimal changes to their existing apps. Whereas I would think your goal is to let users opt into the new behavior in their newly created apps. So rather than withBootstrap4 I would imagine just using prefixes or alternate function names altogether would be much preferred for you.
Not even after I would rename it to something like nicelyV4 or shiny2?
I meant if you kept the name shiny. I doubt shiny2 would be allowed on CRAN, my understanding is that they really discourage that kind of thing now even from the same maintainer, much less from a totally different maintainer.
But even releasing under a different name would cause big headaches for everyone, especially you, as you'd now be responsible for merging all of the changes from Shiny into your own fork, and most of them would not be related to the UI functions at all. You also would not be able to take advantage of the Shiny integration features of RStudio IDE, nor Shiny Server, RStudio Connect, R Markdown, Crosstalk, etc.
Generally, what I saw, is that 80% of time you can work with find-all - replace all
Yeah, I imagine most problems can be easily fixed by a determined Shiny app author. But our users have built a ton of Shiny apps out there, and there are lots of other people who are responsible for keeping Shiny apps running that were written by authors who have moved on. Every time we break backwards compatibility we hear about it from our users, in some cases we hear about it for years after the mistake was corrected. So you have to understand, we're very sensitive about any kind of breaking changes at this point.
That's not to say we won't do something about BS4 right in Shiny, eventually; just that it has to be done with careful consideration to all of the various forces we need to balance.
changed the title [-]Feature request: avoid using zoom property[/-][+]Discussion about Bootstrap v4 and how to implement it [was Feature request: avoid using zoom property][/+]on Apr 16, 2017
Activity
jcheng5 commentedon Apr 5, 2017
Thanks for all the feedback lately. Are you actually using showcase mode for your own purposes? Just curious--we didn't think anybody outside of our team, and maybe other Shiny educators, would even think about it.
dmpe commentedon Apr 5, 2017
https://github.com/dmpe/shiny/ I am trying to make it work for bootstrap v4 (in a new package) and showcase mode with code next to it is very problematic to fix right now.
Basically when a page loads,
<td id="showcase-sxs-code" class="showcase-sxs-code-collapsed" style="">gets loaded withdisplay: hidden;(automatically) resulting into the code panel (tabs + content) not being shown. :(dmpe#8
jcheng5 commentedon Apr 5, 2017
dmpe commentedon Apr 6, 2017
This goes back to the issue #1604.
(to answer your question: no, i did not)
Could you please give an example? If I understand correctly, I would create a new package
abcand this would contain many of the new methods that apply to the bootstrap v4. Good so far.But what do I do with upgrade of dependencies (in
wwwfolder and e.g. description file), changes to javascript & css files etc. The reason why I do a full fledged fork is because I need to access all files in currentshinyin addition to the fact that I also do not consider any kind of backwards compatibility - existing apps e.g. inshiny-examplesrepo should work with only minimal changes. Especially not with the old browsers e.g. IE8/9/10. Simply because bootstrap v4 doesnt take them into account either (even though some other js libraries do).Plus there are many changes, sometimes even to logic, e.g. to maintain
activetabs/pills.Changes so far: master...dmpe:bootstrap4_changes
I am willing to help as much as i can. Just let me know.
jcheng5 commentedon Apr 8, 2017
So the idea (one idea) would be that Shiny wouldn't change at all,
fluidPagewould always load BS3 and that's that. But if the user wants to use Bootstrap 4, then they usebs4_fluidPagefrom your package, which would load your package's copy of Bootstrap 4. If they usebs4_selectInput, then they get your package's copy of selectize and your input binding.The problem with a full-fledged fork as you've done, is that you can never put such a package on CRAN, and therefore no package that is on CRAN can ever take a dependency on your work.
On the other hand, building a new Bootstrap 4 package that stands independent of the Shiny package but integrates with it perfectly, is a lot of work, and I just assumed nobody outside of our team would have the desire to actually build and support such a package. But the downside of waiting for us to do it is, well, you might be waiting for a while--we've got some big Shiny projects keeping us busy right now.
The other thing to recognize is that Bootstrap 4 may be fundamentally incompatible with R Markdown themes and output formats that have depended strongly on Bootstrap 3 for a long time. And also with Shiny apps that include custom CSS that target Bootstrap 3.
It's a hard problem without a lot of great solutions...
dmpe commentedon Apr 9, 2017
Let's go step by step to make sure I understand 100% what you mean :)
Please, correct me if I got it wrong, but are we here talking about something like https://github.com/rstudio/shinybootstrap2 which would be for BS v4 ? In that case, testing becomes cumbersome because for each shiny example you need to add something like
shinybootstrap4::withBootstrap4({:(Not even after I would rename it to something like
nicelyV4orshiny2? (question is honest - really dont know). Anyway, it would take a huge time/coding effort until it can be released there, so not a concern for me now. :)Hmm, thanks for mentioning it 👍 I didnt know
rmarkdownuses bootstrap v3 as well.But, yeeh, I expect that to be sometimes the case.
Generally, what I saw, is that 80% of time you can work with
find-all-replace alljcheng5 commentedon Apr 10, 2017
shinybootstrap2 took the
withBootstrap2approach because the goal was to allow Shiny users to opt into the old behavior with minimal changes to their existing apps. Whereas I would think your goal is to let users opt into the new behavior in their newly created apps. So rather thanwithBootstrap4I would imagine just using prefixes or alternate function names altogether would be much preferred for you.I meant if you kept the name
shiny. I doubtshiny2would be allowed on CRAN, my understanding is that they really discourage that kind of thing now even from the same maintainer, much less from a totally different maintainer.But even releasing under a different name would cause big headaches for everyone, especially you, as you'd now be responsible for merging all of the changes from Shiny into your own fork, and most of them would not be related to the UI functions at all. You also would not be able to take advantage of the Shiny integration features of RStudio IDE, nor Shiny Server, RStudio Connect, R Markdown, Crosstalk, etc.
Yeah, I imagine most problems can be easily fixed by a determined Shiny app author. But our users have built a ton of Shiny apps out there, and there are lots of other people who are responsible for keeping Shiny apps running that were written by authors who have moved on. Every time we break backwards compatibility we hear about it from our users, in some cases we hear about it for years after the mistake was corrected. So you have to understand, we're very sensitive about any kind of breaking changes at this point.
That's not to say we won't do something about BS4 right in Shiny, eventually; just that it has to be done with careful consideration to all of the various forces we need to balance.
[-]Feature request: avoid using zoom property[/-][+]Discussion about Bootstrap v4 and how to implement it [was Feature request: avoid using zoom property][/+]bborgesr commentedon May 1, 2017
Closing for now. When we start working on this, we'll open an updated issue about it (see my note here: #1604 (comment)).