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
I want to add the rustfmt.toml to rust-playground. The motivation is below.
to report the rustfmt bug with option easily
to create the working example for rustfmt option
I think this issue helps us to resolve the issue easily and a convenience to know the behavior about rustfmt option. If you don't mind, can I create this feature?
It's not clear what you mean by this. Can you please provide a more detailed plan of what exactly the feature will do, a rough guide of how the feature will be implemented, and a general idea of what the UI will look like?
I think there is two-step to introduce this feature, so I plan to send the PR two times at least.
add the modal to write rustfmt.toml. the content in modal is sent to the server and mounted on docker container as rustfmt.toml. (I plan to implement like main.rs in rust-playground.)
includes the rustfmt.toml information in a permanent link
I already confirmed the rustfmt.toml mounted to docker worked on rust-playground.
The UI image is below. The dialog design is not decided. I think it will be changed.
I wonder if adding the element to open the configuration next to the rustfmt button would make more sense and be more discoverable.
I think so too. I will add the config button next rustfmt button.
One thing I can see people wanting is some kind of autocomplete for the config file. An easier middle ground would be a link to the rustfmt doc page.
I'm not extremely excited for modals, but that could be a reasonable place to start.
I also think some kind of autocomplete for the config file is better than a simple modal. But rustfmt options exist over 50 now and are expected to continue to increase(This number includes unstable options). It's a bit hard to add autocomplete soon. So the modal is a reasonable place to start. And as you say I need to add the rustfmt help page link.
The more detail. I think the right side of the modal can be used for autocomplete UI(not implemented now) in the feature. The ? icon is a link for the rustfmt GitHub page.
Activity
[-]add the rustfmt.toml in rust-playground[/-][+]Add rustfmt.toml[/+]shepmaster commentedon Jan 22, 2020
It's not clear what you mean by this. Can you please provide a more detailed plan of what exactly the feature will do, a rough guide of how the feature will be implemented, and a general idea of what the UI will look like?
rchaser53 commentedon Jan 23, 2020
I think there is two-step to introduce this feature, so I plan to send the PR two times at least.
I already confirmed the rustfmt.toml mounted to docker worked on rust-playground.
The UI image is below. The dialog design is not decided. I think it will be changed.
rchaser53 commentedon Jan 23, 2020
I think this modal approach is useful when a new config file will be added. Easy for extensible.
(ex. clippy.toml)
shepmaster commentedon Jan 24, 2020
Thank you for the screenshots and clarifications!
I wonder if adding the element to open the configuration next to the rustfmt button would make more sense and be more discoverable.
One thing I can see people wanting is some kind of autocomplete for the config file. An easier middle ground would be a link to the rustfmt doc page.
I'm not extremely excited for modals, but that could be a reasonable place to start.
rchaser53 commentedon Jan 24, 2020
I think so too. I will add the config button next rustfmt button.
I also think some kind of autocomplete for the config file is better than a simple modal. But rustfmt options exist over 50 now and are expected to continue to increase(This number includes unstable options). It's a bit hard to add autocomplete soon. So the modal is a reasonable place to start. And as you say I need to add the rustfmt help page link.
Based on the above I attached the redesigned image. The help link is a GitHub page for rustfmt. https://rust-lang.github.io/rustfmt/
rchaser53 commentedon Jan 24, 2020
If there is not a big problem, I want to start creating PR.
How about arguing the detail UI design after when I send the PR?
rchaser53 commentedon Jan 27, 2020
The more detail. I think the right side of the modal can be used for autocomplete UI(not implemented now) in the feature. The ? icon is a link for the rustfmt GitHub page.
