-
Notifications
You must be signed in to change notification settings - Fork 1
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
Interactive configuration builder - Setup beautifiers, languages, and options #11
Comments
@Glavin001 How will Setup Beautifiers work exactly? Are we going to have the option to select which beautifiers to install versus putting them all in the editor package.json? |
I would like to present the user with the supported options for each beautifier. If the user only wants to use a subset of the possible configuration options, then there may be beautifiers which are unnecessary to achieve the desired beautified result and can therefore be removed. Consider the I think an interactive tool similar to CSSComb's may allow users to choose "I don't care" for "Choose the code sample you like more:" which would allow us to narrow down which beautifiers we actually need to apply. Thoughts? |
OK, so this has nothing to do with the installation of beautifiers themselves? What would be the difference between Setup Beautifiers and Configuration Beautifiers? |
I think the original intent of |
I've started working on this. I'll need some help getting the options pulled in from where ever the source ends up being, and how to best go about "saving" each selected option as they go through the wizard. Bootswatch has cards that are perfect for putting code samples in, although I need to figure out how to make them all the same width and height since samples will take up different amounts of whitespace. |
How I'm approaching it (everything mentioned is under src/pages/setup) @Glavin001 would like your input on this design and where you would make changes since you know React a lot more than I do.
The first three would change when the user switches which step they are on. The wizard will render the base UI, along with OptionButton components.
|
I was thinking:
|
Holding off further until data fetching and beautifying is resolved. |
Sounds like my kind of thing 😄 . Reassigning. |
@szeck87 Do you have a branch you could create as a PR and I will take it over? |
https://github.com/szeck87/assistant/tree/options-wizard?files=1 I was mostly waiting to decide what to do with the API, whether to have one that there playground and assistant is or one of each. |
I think I'll build a reusable API for these public sites. I am still working out how this should function and also be funded.. I want to use Docker and haven't found a free way to run a Docker server 😜 . |
@szeck87 Wow that looks great, too! Which do you prefer https://clangformat.com/ or http://csscomb.com/config ? |
@szeck87 New Playground API has been created: Unibeautify/playground#26 |
@szeck87 you can pass |
I like the idea of having the options in a list so you can easily go back to one without going through step buttons. And also a description of what the values mean, but that would require an interface change in Unibeautify. However it lacks a real builder where you can select something and are able to download the config file itself. I think a hybrid would look/function well. First and last steps are always "Select Languages" and "Finish" or something, where the latter would have the config file available for download. Once the languages are selected, the left pane would list out all of the options based on them. The rest would look something like #11 (comment). I don't know if the code toggle like clang-format has there would work all of the time, depending on how many values are there for an option. It certainly looks better than the boxes from csscomb and ours. |
@szeck87 's progress: https://github.com/unibeautify/assistant/tree/options-wizard |
From @szeck87 :
|
@szeck87 : Thoughts on adding analytics to the process? We could track how long it takes a user to complete X number of options choices and then calculate an average. Then later we could say "you have Y steps with X options to choose, it usually takes someone Z minutes to complete" |
Yea I like both of those ideas. Give users the ability to report that there are issues with the steps, and at the same time we can track. Can we track how much time a user spends on a specific option? I also think we don't need the Add/Edit example buttons here. Maybe a link in the metadata that says |
We can track anything we can measure (in milliseconds) and send to Google Analytics with https://developers.google.com/analytics/devguides/collection/gtagjs/user-timings So we could track a step page, such as
I really want to encourage users via the website and now here in the assistant to contribute. If the sample does not demonstrate properly, change it! If there is no sample, add one! I want to leverage the power of the open-source community as much as possible. |
While playing around with the assistant I found a problem. I reproduced it in the Playground: Currently all beautifiers are enabled in some arbitrary order. We need to provide tools so users know cases like this "If you care about option X, then Prettier respects it and Pretty Diff messes it up. You want Prettier to be before Pretty Diff." 🤔 |
Sort of goes back to one of the Must Haves: "Show a page for selecting beautifiers? I kind of feel we need to do this, as some beautifiers you don't have the same amount of control over" Beautifiers like Prettier don't support many options and even override what other beautifiers do since it's opinionated. How does the pipeline work exactly? Does it go through one beautifier first, then the next, and so on? If Prettier is always the last, very little of how you configure Unibeautify might be used. |
Yes, exactly.
Very true. One idea is to order by importance. For example, if you have options A, B, C configured and each are supported by a different beautifier, you could apply the beautifiers in reverse order -- the most important being last. For example, this could mean Prettier (opinionated) first and ESLint (configurable) second, which is what https://github.com/prettier/prettier-eslint does. 🤔 |
Close #11. Configuration Assistant / Wizard
Poll: Which do you prefer https://clangformat.com/ or http://csscomb.com/config ?
Must Haves
Nice to Have
I found CSS Comb's build config flow interesting: http://csscomb.com/config.
The text was updated successfully, but these errors were encountered: