Closed Bug 1561639 Opened 5 years ago Closed 5 years ago

Font Editor: simplify handling of font variation instances

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: rcaliman, Assigned: rcaliman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Slightly refactor the Font Editor Redux actions and reducer to remove indirection from the handling of font variation instances when supported on variable fonts.

This simplifies the code and remove some needless async operation.

The Redux action/reducer setup for handling selecting and applying font variation instances is needlessly complex. The indirection is not necessary.

The flow is as follows:

  • When a font variation instance (provided by some variable font files) is selected from the Instances select menu, update all variation axes with the values associated with that instance.

  • When the user makes any manual change to any of the axis values, save all axis values associated with a "Custom" variation instance. This enables the user to revert to them.

This patch removes the needless indirection about saving the axis values and applying the "Custom" variation instance. The logic is now moved to the UPDATE_AXIS_VALUE reducer.

Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5f0520d9b5de
Simplify handling for font variation instances in Font Editor. r=gl
Backout by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f1699730633
Backed out changeset 5f0520d9b5de for ESlint failure

Fixed linting issues and pushing again.

Flags: needinfo?(rcaliman)
Pushed by rcaliman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/666a43a4ae84
Simplify handling for font variation instances in Font Editor. r=gl
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Component: Inspector: Fonts → Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: