Skip to content
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

Separate font.lib-like file for user interface state? #121

Open
justvanrossum opened this issue Jul 21, 2020 · 9 comments
Open

Separate font.lib-like file for user interface state? #121

justvanrossum opened this issue Jul 21, 2020 · 9 comments
Assignees
Labels
approved Approved specification change. proposal Proposed specification change. ufo3 UFO 3 issues.

Comments

@justvanrossum
Copy link
Contributor

Currently we don't differentiate between lib items that contain important custom data for a project and lib items that hold some UI state for an editor. UI state usually is not desirable to put under version control.

An optional font.ufo/uistate.plist file could solve this, as it could be easily ignored by version control systems.

@typemytype
Copy link
Contributor

I assume the data folder can be uses for this: any editor can save a com.myAppName.requiredUIData.plist file. It can be any format, or even binary custom data..

If there are common UI states across multiple editors a public lib key can be made.

@justvanrossum
Copy link
Contributor Author

Good point.

I think the spec should say lib is not for ui state, and apps should store it in the data folder.

@belluzj
Copy link

belluzj commented Jul 22, 2020

Yes, that sounds like a good idea to separate the two. For example in glyphsLib we're storing open tabs (called "display strings") in a lib key, and that creates some not very useful diffs.

@typesupply
Copy link
Contributor

@typemytype

I assume the data folder can be uses for this

@justvanrossum

I think the spec should say lib is not for ui state, and apps should store it in the data folder.

These are both great ideas. I'll take this on since it's just some writing. I'll think about it over the next few days and write a draft here.

@typesupply typesupply self-assigned this Jul 22, 2020
@justvanrossum
Copy link
Contributor Author

justvanrossum commented Jul 22, 2020

I guess fontParts could implement this as a lib-like api. For example, I don't think RF extension developers should have to do this directly with ufoLib or even a raw font.ufo/data api.

@benkiel
Copy link
Contributor

benkiel commented Jul 22, 2020

Yes, it could do, and then it could be more generic than just RF.

@typemytype
Copy link
Contributor

small comment: fontParts has not yet support for the data folder (this is a different issue in a different repo)

@typesupply typesupply added approved Approved specification change. proposal Proposed specification change. ufo3 UFO 3 issues. and removed enhancement labels Aug 12, 2020
@typesupply
Copy link
Contributor

Here's a draft with the bulk of the normative language copied/pasted from lib.plist so it should be good to go unless there are other suggestions for the file name or lib recommendations.


Addition to /data documentation:

public.interfaceLib.plist

This file name is reserved for a property list containing arbitrary interface settings in a lib structure identical to [lib.plist]. The property list data consists of a dictionary at the top level. In order to prevent conflicts in the lib, keys in the top level should follow a reverse domain naming scheme. The pattern "public.*", where * represents an arbitrary string of one or more characters, is reserved for use in standardized lib keys. It is recommended that the data stored as a value be as shallow as possible.


Addition to lib.plist documentation:

It is recommended that interface data be stored in the public.userInterfaceLib.plist file within the [data directory].


Addition to GLIF <lib> documentation:

It is recommended that interface data be stored in the public.userInterfaceLib.plist file within the [data directory].

@chrissimpkins
Copy link
Contributor

chrissimpkins commented Apr 3, 2021

easily ignored by version control systems.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Approved specification change. proposal Proposed specification change. ufo3 UFO 3 issues.
Projects
None yet
Development

No branches or pull requests

6 participants