-
Notifications
You must be signed in to change notification settings - Fork 47
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
How to increase the size of the modal windows? #134
Comments
Width or Height or both? Also, can you explain your setting and why you need this? |
Now that "detail" will be the default setting for shinyFiles, using a wider modal by default seems to make sense. Try out the new development version using the command below (assumes you have the
|
Thanks for your answer. Today is full of conf calls, but I will tell you tomorrow. |
Cool, wider. How to make it higher? Is there a way to set pixel or perentage dimensions by a ShinyJS trick or to make auto-adjust to 70% of height and 50% of width? |
I'm sure it is feasible. However, you would have to dig into |
Thanks. I must confess that I doesn't like JS and vice versa. Nevertheless I will have a look. |
Same :) @thomasp85 wrote 99.9999% of the JS in shinyFiles.js. And apparently, he doesn't like JS either. |
How could it be possible???? :-) |
The current solution consists in adding such a code to ui.R to define the height in the DOM. Do you think it's OK?
No shinyJS needed yet. |
Couldn't you add this to your CSS file directly? I'd still be interested in having this as an argument to the different shinyFiles functions. |
Currently, I change the height of the modal dialog once created by a piece of javascript in shinyFiles.js. I did play a little bit with the style, but didn't find a way yet. I didn't find a way to retrieve the height from a style definition neither. So, I have to assign the custom style to an object in the DOM that is not displayed. |
CSS would be nice. Setting an argument to, e.g., BTW if you set the https://github.com/thomasp85/shinyFiles/blob/master/R/filechoose.R#L400-L429 |
I will look into your link tomorrow. |
I don't understand what you to show me with L400-L429. Is it about automatic resizing? |
L400-L429 was just an example of how I've used an argument in R (i.e., |
Today, I started looking as viewport to guess its height. I ended up on a clear explanation of using units relative to viewport https://stackoverflow.com/questions/11516291/css-get-height-of-screen-resolution. So I modified the height of the sF-fileWindow to 60vh, and it does the job. Maybe there should be some |
To keep a track of what I did yesterday. shinyFiles/inst/www/shinyFiles.js Lines 916 to 918 in 5114986
I added (comments to be removed, variables need to be renamed)
In my ui.r, at the beginning of the fluidpage function, I added
|
For the directory window, my choices are the following:
and
The directory and file selectors with a height of 60vh reduces nicely down to a view size of 610 px high. Decreasing those 3 values by 10vh allows a nice display down to a view size of 480 px high. |
which produced @SamGG I really appreciate taking a first crack at this. It looks like lots of elements need to be configured just right to adjust height properly. If you can make it work for your setting then great. Unfortunately, I won't have time any time soon to really dig into this. |
This is great @SamGG! Personally, I found 60vh a little too large for Does seem reasonable to you?
|
The increase in default height works well with the new default detail view. Users can still adjust in CSS as discussed in the issue below. #134
Dear Vincent, I am glad you catch my point. Your changes are perfect, 50vh being sufficient. |
Thank you for your contribution @SamGG. Much appreciated. I added information to the NEWS file. Updates will go to CRAN shortly. https://github.com/thomasp85/shinyFiles/blob/master/NEWS.md |
Thanks to you. I wish you have enough energy to maintain this package during the next decade :-) |
Thanks @SamGG. I have a big shiny app (https://github.com/radiant-rstats) that relies heavily on shinyFiles so I'll probably keep this up for a while ... unless you are volunteering :) |
radiant is not big! |
Thanks for maintaining this invaluble package.
I notice some discussion about my question, but I didn't a practical way to achieve it.
I just want to change/overload a variable or css code, but I don't know where to search or what to change.
Could you help me?
Best,
Samuel
The text was updated successfully, but these errors were encountered: