PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
35 stars 89 forks source link

Calculator child input and marriage input buttons are rounded #912

Closed anth-volk closed 3 weeks ago

anth-volk commented 6 months ago
Screen Shot 2023-11-28 at 2 17 27 PM

They should ideally be squared like all other buttons on the site

MaxGhenis commented 6 months ago

This is true of all categoricals right?

I think we should go with a standard like the antd radio buttons instead, to make it more obvious that it's a choice: https://ant.design/components/radio

Specifically this is closest:

image
optionType="button"
buttonStyle="solid"
anth-volk commented 6 months ago

Good point, could improve accessibility as well.

And I suppose it is true for all categoricals, but since link buttons are squared, I wonder if maybe we should use an antd standard, but squared? Or minimally rounded, as in the image you sent, at the least.

On Nov 28, 2023, at 20:20, Max Ghenis @.***> wrote:

 This is true of all categoricals right?

I think we should go with a standard like the antd radio buttons instead, to make it more obvious that it's a choice: https://ant.design/components/radio

Specifically this is closest: image.png (view on web)

optionType="button" buttonStyle="solid" — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

MaxGhenis commented 6 months ago

This is a bigger conversation but I'm partial to going with a design standard like Ant for all buttons. I think this would improve usability, accessibility, and maintainability. For example the button color swiping across makes it feel sluggish, especially when moving a cursor across multiple buttons. I think there are good reasons for the kinds of choices designers at Ant and elsewhere adopt when creating standards. We're innovating on enough fronts already ;)

maurobusso commented 6 months ago

I personally think in this situation with a big squared button below, two rounded one on the top would make the page look stylistically a bit messy. But this is just my opinion. :)

daemon-reconfig commented 1 month ago

can I take this issue?

anth-volk commented 1 month ago

@daemon-reconfig Sure. Just a few things to note:

daemon-reconfig commented 1 month ago

sure thanks for letting me know. I am terribly sorry for this late reply

daemon-reconfig commented 1 month ago
Screenshot 2024-04-12 at 11 31 31 AM

is this what we were looking for?

anth-volk commented 1 month ago

Not at all a problem. We're looking for something similar, except it should be an Ant Design radio component, as described by Max above, with completely squared off sides, i.e., a specified border radius of 0.

daemon-reconfig commented 1 month ago

i did make the border radius 0 but it looked weird. although if you want to i shall do the same. i am sorry if i wasn’t able to understand anything.

anth-volk commented 1 month ago

That's alright, could you just share a photo so we can see how it looks?

daemon-reconfig commented 1 month ago

i will send them to you asap

daemon-reconfig commented 1 month ago
Screenshot 2024-04-12 at 9 42 28 PM

this is how it looked

anth-volk commented 1 month ago

I see. Could you use the parameter that Max mentioned, i.e., optionType="button" and send again?

daemon-reconfig commented 1 month ago
Screenshot 2024-04-12 at 10 00 21 PM

here

anth-volk commented 1 month ago

There's specifically a component where the individual items are merged together in Ant Design. The docs on this are at https://4x.ant.design/components/radio/#header. This is what Max is referring to.

daemon-reconfig commented 1 month ago

hmm so I need to change the whole RadioButton.jsx and add antd buttons right? or I can recreate something similar to the above example

anth-volk commented 1 month ago

Ah, this isn't already an Ant Design component? In that case, yes, we would be looking to replace it with antd, as we're trying to standardize against that library.

daemon-reconfig commented 1 month ago

sure will try, also this wasn't an ant design component

daemon-reconfig commented 1 month ago
Screenshot 2024-04-12 at 10 49 04 PM

is this it?

daemon-reconfig commented 1 month ago

changed into antd buttons

anth-volk commented 1 month ago

Thank you very much. One last thing - could you change the text color on the selected item to be easier to read, perhaps by using the WHITE color that we provide in the same styles files that you used for the color? And after that, is this ready for review?

daemon-reconfig commented 1 month ago

Did change the colors of it and yes it is ready for review should i open a PR

anth-volk commented 1 month ago

Sure, please feel free. In it, it'd be great if you could provide a screenshot of the final component, as well. Thanks so much, @daemon-reconfig.

daemon-reconfig commented 1 month ago

sure will

daemon-reconfig commented 1 month ago
Screenshot 2024-04-13 at 2 01 13 AM
daemon-reconfig commented 1 month ago

if its fine i will open a pr

daemon-reconfig commented 3 weeks ago

can we close this issue?

anth-volk commented 3 weeks ago

Yes, thank you