-
Notifications
You must be signed in to change notification settings - Fork 19
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
Towards v2.0 #20
Comments
I am really happy that we have the same vision in terms of the improvement that can be made for Feliz.Bulma :) These two points are indeed related and in Fulma they do use the same convention.
It would give something like that for Feliz.Bulma
In Fulma, we have
TBH I don't see how code generation would help us here and I think it will requires some setup from the user perspective. I am in favour of using type BulmaColor with
static member myCustomColor = ...
Oh, it was just an ascertainment. It is neither bad or good just different. It's also important to note that when using Fulma I don't need Bulma documentation but I designed the library for hours, used it daily for more than 2 years and feel at home with it :D. I suppose most of Fulma users do use Bulma documentation because it's more complete than Fulma one. All that to say, the current Feliz.Bulma documentation is good and does the job. If something could be changed, it is the styling to make it more "clean" but this is a matter of taste and not a priority IHMO.
We can think about it indeed but from my experience in general even with Fulma helpers for the Tabs I still needed to create my own in order to mutualize the code. Another thing to know when designing this kind of helpers is that you lose a bit of control. In certain case, it is not really a problem in the case of Tabs it isn't either is it for the Pagination. // This is the code for Pagination.Link.a, here we lost control over the `<li>` element but I don't see people needed to control that one
/// Generate <li><a class="pagination-link"></a></li>
/// You control the `a` element
let a options children = link a options children But in the case of "complex" component like I had to create specials attributes in order to allow the user to control the /// Generate
/// <fragment>
/// <input class="is-checkradio" type="checkbox">
/// <label>One</label>
/// </fragment>
let checkboxInline (options : Option list) children =
genericElement "checkbox" "is-checkradio" options children This an exception but that's component is using several HTML element to shows only one component but I prefered to mention it.
I agree and that's why I said we need a middle-ground between Feliz.Bulma simplicity and Fulma completeness but verbosity. For information, I don't use simplicity as a bad thing. And completeness is probably not the right word but I can't figure out another word. |
Hi Maxime, I created few more issues to track work on them separately. Will not get into it before Easter, but just to do not forget. If you think something is missing, let me know or create new one. We can discuss then separately on each topic. |
Hello @Dzoukr awesome. |
Ok, all sub-issues are now closed. I think we should release v2.0, what do you think @MangelMaxime? |
@Dzoukr I agree with you :) When done, I will update Fable REPL to Feliz.Bulma v2 in order to check everything is working as expected. |
Version v2 is out (indexed on Nuget soon). Thanks Maxime for amazing contribution and help! 🙏 |
I think it is good to think about version 2 and API changes / breaking changes to make library better. Based on great summary written by @MangelMaxime at Zaid-Ajaj/Feliz#155 I think some (most) of Maxime's feedback issues should be fixed.
The things I fully agree and would love to fix them in v2.
Some of the components don't follow the same convention⚠️
There should be unified way of dealing with components. Most likely in a way
Bulma.input.text
orBulma.input.password
instead ofBulma.inputPassword
. Approach like this will also resolve another point I agree with:Feliz.Bulma doesn't provide a way for controlling which HTML element we want to output.⚠️
Yes, mentioned API like
Bulma.field.div
would resolve this, but I would not add it to every element - there must be sane defaults (based on Bulma docs). Otherwise the API would be too talky with low added value. Also, for elements like Button, I need to double think.Bulma.button.a
looks better thanBulma.buttonA
, butBulma.button.button
(default with using button element) looks terrible. But generally fully agree and everyone can search for[<Obsolete>]
in current version to see that I have been already fighting with such design mistake. Fixing that in v2 is a must!It is not easy to add new colour support.⚠️
That was my mistake with understanding Bulma documentation. Was not sure if I can add any defined color to every element so I added colors for each component type based on docs, but if so, then Fulma approach with having one list of colors should be the way. However on API level, I'd like to keep
button.isDanger
. Maybe some kind of code generator would help for this. Another approach would be not having colors directly under element modifier, but usecolor.isDanger
everywhere. Not sure here, really.The things I don't see as a big issue:
Feliz.Bulma is an exact mapping over Bulma - You need to know Bulma well enough or have Bulma documentation opened 🤔
Yes, that is correct. This library was created on two monitors going through Bulma docs and adding elements and modificators. I don't think it is the bad way - there is (almost) no added layer of abstraction. On the other hand, the
Bulma.tabs
is a great example how ugly such approach can be at some cases. The way for v2 could be to identify the "troublemakers" (like tabs or select, which needs to be wrapped in div by default) and the tiniest abstraction possible over it.Feliz.Bulma makes it easy to mix components behaviours. 🤔
As Maxime wrote: Is can be nice way to extend existing component behavior, but also can lead to creating invalid code. I think it is the price for full compatibility with Feliz. Not ideal, but not the biggest issue here.
This list is not finite and will be updated during discussion with @MangelMaxime.
Updated 9. 4. 2020
Major indentified points for v2.
The text was updated successfully, but these errors were encountered: