-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improve explanation for the necessity of Javascript Optimization #88
Comments
Howdy! 👋 There are a couple of reasons why the input dynamically sizing makes sense stylistically.
Elm select was heavily influenced by its React cousin react-select. I did have very similar questions when I saw the dynamically sizing input but understood once I explored all the features it provides. If you have suggestions on how I can improve the docs for this please feel free to let me know. I really wanted to put forward that it will work fine without the jsOptimize flag but that it was there in case edge cases were hit. Hope that clears some of it up! |
Thank you for the quick response! This answers my question. The line wrap argument makes sense. I think this means that in the non-optimized version, it will generally wrap to the next line earlier than in the optimized version. Incidentally, it looks like this advantage can't actually be seen in the optimized example since it is not a multi-select. Regarding autocomplete, I look forward to seeing that improvement. I think it will have some difficulty in non-optimized mode because of the relatively little control we have over the input size. In terms of documentation, I think it would be reasonable to change "For stylistic reasons" to "In order to be able to be displayed inline with other UI elements". |
Precisely! Whilst the non-optimized version still dynamically sizes, as you mentioned, it will eventually wrap earlier than the optimized input.
Absolutely! It will definitely be a challenge getting things to look right in the non optimized version considering how the input grows. There is of course having the option to make it an optimized only feature as a first iteration. Which is why I called it Updated the docs in the attached PR, let me know if you feel this is clearer and it should make an appearance in the next release. Many thanks for the feedback! |
Right now, the documentation says that the input element dynamically adjusts its width for "stylistic reasons". However, I can't tell what the motivation actually is from the current documentation. Is there something that would be stylistically different if the width of the input were always the maximum width that fits in the border?
The text was updated successfully, but these errors were encountered: