You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cip: 24
title: Settings Index
author: Michael Sena (@michaelsena), Paul LeCam (@PaulLeCam)
status: Draft
category: Standards
type: RFC
created: 2020-07-23
requires: Tile Doctype (CIP-8), DocId Map (CIP-10)
Simple Summary
Settings Index is a document that stores an index of global settings-related documents for a DID.
Abstract
In an identity-centric model of development, users carry their identity and resources with them across various contexts. Applications then use with these resources to provide service to the user. Portable settings allow interfaces and experiences to be contextualized and customized to the user's personal preferences, such as internationalization (commonly abbreviated as i18n) (locale, currency format), location (country of residence), accessibility (font size), appearance (dark mode), and more.
Settings Index is a document that stores an index of global settings-related documents for a DID. It does not actually store the DID's raw settings data, but rather serves as a way to route to the documents which do.
Settings Index utilizes the DocId Map (CIP-10) schema, which simply stores a list of strings which map to Ceramic DocIds. In this case, the DocIds are pointers to various documents that store a user's settings information. A reference to this schema should be included in your Settings Index document when it is created.
Table
Settings Index Table (link when PR is submitted) contains the standard set of properties that may be contained in any given Settings Index. New properties can be added to the table by following the steps below. Additional properties not found in this table may be stored in any Settings Index, however they may be less interoperable since others may not know what they represent. Here are some common examples of properties stored in Settings Index:
i18n: a link to i18n Settings, a document which contains a DID's internationalization settings (i.e. locale, currency format)
location: a link to Location Settings, a document which contains a DID's location settings (i.e. country of residence)
accessibility: a link to Accessibility Settings, a document which contains a DID's accessibility settings (i.e. font size)
appearance: a link to Appearance Settings, a document which contains a DID's appearance settings (i.e. dark mode)
How to add a new property to the Settings Index Table
Choose a unique, descriptive property name.
Add a description for your property.
Submit a PR to the CIP repository updating the Settings Index Table (link with PR) with your property.
Mention the authors of this CIP in the comments of your PR.
Tags
When creating a Settings Index document, add the SettingsIndex tag to the document header.
Instead of storing all settings information in one single document, It makes more sense to create an index of settings-related documents which each store subsets of a user's settings. This design provides flexibility by allow new categories of settings to easily be added to the Settings Index without needing to revise the standard and minimizes the impact of updating individual schemas since they will not affect every other settings document. This design also improves performance by minimizing load time, since loading can be parallelized and users can only sync the needed subsets of information without always needing to load one ever-growing file.
Implementation
Settings Index Table: Find the Settings Index Table here. (Linked with PR)
DocId Map Schema: Find the DocId Map schema used by the Setting Index here. (Linked with PR)
Libraries: Not yet available.
Usage
Root Index: Since settings are only one type of resource that can be associated with a DID, it is advisable to add the Settings Index to a Root Index (CIP-12), which serves as a top-level index for a DID's resources. The recommended path from a DID to the Settings Index is: DID/Root Index/Settings Index.
Simple Summary
Settings Index is a document that stores an index of global settings-related documents for a DID.
Abstract
In an identity-centric model of development, users carry their identity and resources with them across various contexts. Applications then use with these resources to provide service to the user. Portable settings allow interfaces and experiences to be contextualized and customized to the user's personal preferences, such as internationalization (commonly abbreviated as i18n) (locale, currency format), location (country of residence), accessibility (font size), appearance (dark mode), and more.
Settings Index is a document that stores an index of global settings-related documents for a DID. It does not actually store the DID's raw settings data, but rather serves as a way to route to the documents which do.
Settings Index is a subdirectory of the Identity Index (IDX) (CIP-11) and is usually linked from the Root index (CIP-12).
Motivation
The Settings Index seeks to:
Specification
The Settings Index specification consists of a doctype, schema, table, and tags.
Doctype
Settings Index uses the Tile Doctype (CIP-8).
Schema
Settings Index utilizes the DocId Map (CIP-10) schema, which simply stores a list of strings which map to Ceramic DocIds. In this case, the DocIds are pointers to various documents that store a user's settings information. A reference to this schema should be included in your Settings Index document when it is created.
Table
Settings Index Table (link when PR is submitted) contains the standard set of properties that may be contained in any given Settings Index. New properties can be added to the table by following the steps below. Additional properties not found in this table may be stored in any Settings Index, however they may be less interoperable since others may not know what they represent. Here are some common examples of properties stored in Settings Index:
i18n
: a link to i18n Settings, a document which contains a DID's internationalization settings (i.e. locale, currency format)location
: a link to Location Settings, a document which contains a DID's location settings (i.e. country of residence)accessibility
: a link to Accessibility Settings, a document which contains a DID's accessibility settings (i.e. font size)appearance
: a link to Appearance Settings, a document which contains a DID's appearance settings (i.e. dark mode)How to add a new property to the Settings Index Table
Tags
When creating a Settings Index document, add the
SettingsIndex
tag to the document header.Example
An example Settings Index document.
Rationale
Instead of storing all settings information in one single document, It makes more sense to create an index of settings-related documents which each store subsets of a user's settings. This design provides flexibility by allow new categories of settings to easily be added to the Settings Index without needing to revise the standard and minimizes the impact of updating individual schemas since they will not affect every other settings document. This design also improves performance by minimizing load time, since loading can be parallelized and users can only sync the needed subsets of information without always needing to load one ever-growing file.
Implementation
Settings Index Table: Find the Settings Index Table here. (Linked with PR)
DocId Map Schema: Find the DocId Map schema used by the Setting Index here. (Linked with PR)
Libraries: Not yet available.
Usage
Root Index: Since settings are only one type of resource that can be associated with a DID, it is advisable to add the Settings Index to a Root Index (CIP-12), which serves as a top-level index for a DID's resources. The recommended path from a DID to the Settings Index is:
DID
/Root Index
/Settings Index
.Copyright
Copyright and related rights waived via CC0.
The text was updated successfully, but these errors were encountered: