Opened 10 years ago

Closed 10 years ago

#8785 closed feature (fixed)

Progressbar: Remove _value() and always sanitize value option

Reported by: Scott González Owned by: k_borchers
Priority: minor Milestone: git
Component: ui.progressbar Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by Scott González)

There's no reason for the value option to ever be invalid. We should force it to a valid value on init and whenever max, or value changes. The validation on change needs to occur in _setOptions() so that we properly handle a call like .progressbar( "option", { value 120, max: 150 } ) which would try to set the value above the current max.

Change History (5)

comment:1 Changed 10 years ago by Scott González

Milestone: 1.10.0git
Status: newopen

comment:2 Changed 10 years ago by k_borchers

Owner: set to k_borchers
Status: openassigned

I started working on this but noticed a number of things that confuse me and before I create more tickets I am hoping to get some other input.

1 - The min is not configurable. It is 0 and can not be updated. I don't think that is right. 2 - ARIA min/max are not updated if the option is changed 3 - There is no API doc for the max (and missing min) option

comment:3 Changed 10 years ago by Scott González

1) The lack of a min option is by design. When do you ever have negative progress?

2) That's a bug.

3) It's surprising that it's missing on the planning wiki too. I'll update the wiki and the API docs.

comment:4 Changed 10 years ago by Scott González

Description: modified (diff)

comment:5 Changed 10 years ago by Kris Borchers

Resolution: fixed
Status: assignedclosed

Progressbar: Refactor to better handle option changes and sanitize values. Fixes #8785 - Progressbar: Remove _value() and always sanitize value option

Changeset: 8976bc7e3d1f03254f914297b1be1b730690d2b8

Note: See TracTickets for help on using tickets.