All users were logged out of Bugzilla on October 13th, 2018

Data Store API: provide a label to categorize data stores

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
5 years ago
5 years ago

People

(Reporter: airpingu, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

5 years ago
After discussion back and forth with other editors [1], we hope to add a new property |label| to categorize the data stores and use the original |name| to identify the data stores, so that the getDataStores("foo") will return an array of data stores that are labeled (categorized) as "foo".

For example, we can have the following data stores related to the messaging purpose:

  label: "messaging"
  name: "messaging-sms-sim-1"

  label: "messaging"
  name: "messaging-sms-sim-2"

  label: "messaging"
  name: "messaging-mms-sim-1"

  label: "messaging"
  name: "messaging-mms-sim-2"

Such that we can formally define the keyword "messaging" in the Messaging API spec as below:

"Use getDataStores("messaging") to retrieve all the data stores that save messaging-related messages, like SMS or MMS. It's up to platform's implementation to decide whether or not to separate data stores to save different types of messages or different sources of messages. For example, SMS can be saved in one data store and MMS can be saved in another one; or just use single one to save both."

https://github.com/airpingu/data-store-api/issues/1
(Reporter)

Comment 1

5 years ago
Using "label" is the current W3C proposal agreed with other editors. We thought this can add more flexibilities to manage the data stores, which is especially useful when we want to maintain diverge data in different stores but they still have the similar purpose.
It seems to me that 'label' is == to what we call 'name'. and 'name' is a unique name chosen by the app.
What we use to make DataStores unique is the manifestURL but a label is more friendly.
Sounds good to me.
(Reporter)

Comment 3

5 years ago
Yes! And I think we can directly do:

1. Add an extra label attribute (equals to the existing name) in our current manifest.
2. Add an extra label attribute in the interface DataStore.
3. Promise getDataStores (s/name/label);

to make changes with backward compatibilities.
(Reporter)

Comment 4

5 years ago
(In reply to Andrea Marchesini (:baku) from comment #2)
> It seems to me that 'label' is == to what we call 'name'. and 'name' is a
> unique name chosen by the app.
> What we use to make DataStores unique is the manifestURL but a label is more
> friendly.
> Sounds good to me.

Eventually, we figured out the "label" doesn't help a lot because ("name" + "owner") already play a similar role. However, we hope to rename "name" to "type", because the "name" of data store sounds to be unique. "type" makes more sense.

So, close this bug as wonfix and I'll fire another bug to address the rename for s/name/type.

Btw, Andrea, Zoltan wants to say hi to you. He said you used to be colleagues in Intel. ;)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.