Skip to content

Discussion about Bootstrap v4 and how to implement it [was Feature request: avoid using zoom property] #1655

Closed

Description

@dmpe

Zoom property is kind of mess which is ignored in FF. There you need to use -moz-transform: scale(2); or something similar.

http://caniuse.com/#search=zoom

I know it is long-shot, but might be worth looking into.

Activity

  1. jcheng5 commented on Apr 5, 2017

    @jcheng5
    Member

    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.

  2. dmpe commented on Apr 5, 2017

    @dmpe
    ContributorAuthor

    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 with display: hidden; (automatically) resulting into the code panel (tabs + content) not being shown. :(

    dmpe#8

  3. jcheng5 commented on Apr 5, 2017

    @jcheng5
    Member
  4. dmpe commented on Apr 6, 2017

    @dmpe
    ContributorAuthor

    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.

    Changes so far: master...dmpe:bootstrap4_changes

    I am willing to help as much as i can. Just let me know.

  5. jcheng5 commented on Apr 8, 2017

    @jcheng5
    Member

    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...

  6. dmpe commented on Apr 9, 2017

    @dmpe
    ContributorAuthor

    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.

    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({ :(

    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

  7. jcheng5 commented on Apr 10, 2017

    @jcheng5
    Member

    are we here talking about something like https://github.com/rstudio/shinybootstrap2 which would be for BS v4

    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.

  8. 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
  9. bborgesr commented on May 1, 2017

    @bborgesr
    Contributor

    Closing for now. When we start working on this, we'll open an updated issue about it (see my note here: #1604 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions