# us.polhem.skywrite.preferences.widget

> A box on Skywrite's dashboard: what it shows, and its settings. Skywrite's built-in widgets are records in skywritecms.bsky.social's repo; widgets someone adds are records in their own repo. The dashboard in us.polhem.skywrite.preferences.app places widgets by their AT URIs.

- Kind: record
- Record key: any
- Authority: preferences.skywrite.polhem.us
- Lexicon: 1
- Published by [polhem.us](https://lexicon.garden/identity/did:plc:p5a4pydyirvdkmc3lhw2iykp), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:p5a4pydyirvdkmc3lhw2iykp/us.polhem.skywrite.preferences.widget)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:p5a4pydyirvdkmc3lhw2iykp/us.polhem.skywrite.preferences.widget/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:p5a4pydyirvdkmc3lhw2iykp/us.polhem.skywrite.preferences.widget/analytics)

## Record (`us.polhem.skywrite.preferences.widget`)

Type: record · key any

### Properties

- `content` (union, required): What the box shows.
  - One of: `#quickCompose`, `#recentDrafts`, `#repoOverview`, `#browseAccount`, `#namespaceCollections`, `#collectionRecords`
- `description` (string): What the box is for, shown when choosing one to add.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `name` (string): The box's heading. Absent: one made from its content, such as 'Quick Compose: Document'.
  - Constraints: minLength: 1, maxLength: 640, maxGraphemes: 64

## #browseAccount (`us.polhem.skywrite.preferences.widget#browseAccount`)

Type: object

A box to open another account's repo, to look at its public records.

### Properties


## #collectionRecords (`us.polhem.skywrite.preferences.widget#collectionRecords`)

Type: object

A list of records from one collection, in your repo or another account's, sorted as chosen.

### Properties

- `collection` (string · nsid, required): The collection to list records from, such as app.bsky.feed.post.
- `descending` (boolean): Whether the largest comes first: newest for dates, highest for numbers, Z to A for text. Records without the field always come last.
  - Constraints: default: true
- `limit` (integer): How many records to show.
  - Constraints: minimum: 1, maximum: 50, default: 5
- `repo` (string · at-identifier): The account whose records are listed, by handle or DID. Absent: the repo the dashboard is showing (yours, or the one being browsed).
- `sortBy` (string): A field of the records to sort by, or a path into one such as 'embed.external.uri'. Dates sort by time and numbers by value. Absent: by record key, which is time order for records keyed by time.
  - Constraints: maxLength: 640, maxGraphemes: 64

## #namespaceCollections (`us.polhem.skywrite.preferences.widget#namespaceCollections`)

Type: object

The repo's collections in a namespace, such as every bsky.app collection (app.bsky) or just app.bsky.feed, each with how many records it has.

### Properties

- `namespace` (string, required): An NSID prefix, such as 'app.bsky' or 'app.bsky.feed'. Collections whose NSID is the prefix or starts with it and a dot are listed.
  - Constraints: maxLength: 317

## #quickCompose (`us.polhem.skywrite.preferences.widget#quickCompose`)

Type: object

A box to write a new record in, publish straight away or keep as a draft to finish in the editor. Only on your own dashboard.

### Properties

- `collection` (string · nsid, required): The collection new records are written to, such as app.bsky.feed.post or site.standard.document.

## #recentDrafts (`us.polhem.skywrite.preferences.widget#recentDrafts`)

Type: object

The drafts saved on this device most recently, to pick up again. Only on your own dashboard.

### Properties


## #repoOverview (`us.polhem.skywrite.preferences.widget#repoOverview`)

Type: object

Every app in the repo, with how many collections each has, and your drafts.

### Properties


## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "browseAccount": {
      "description": "A box to open another account's repo, to look at its public records.",
      "properties": {},
      "type": "object"
    },
    "collectionRecords": {
      "description": "A list of records from one collection, in your repo or another account's, sorted as chosen.",
      "properties": {
        "collection": {
          "description": "The collection to list records from, such as app.bsky.feed.post.",
          "format": "nsid",
          "type": "string"
        },
        "descending": {
          "default": true,
          "description": "Whether the largest comes first: newest for dates, highest for numbers, Z to A for text. Records without the field always come last.",
          "type": "boolean"
        },
        "limit": {
          "default": 5,
          "description": "How many records to show.",
          "maximum": 50,
          "minimum": 1,
          "type": "integer"
        },
        "repo": {
          "description": "The account whose records are listed, by handle or DID. Absent: the repo the dashboard is showing (yours, or the one being browsed).",
          "format": "at-identifier",
          "type": "string"
        },
        "sortBy": {
          "description": "A field of the records to sort by, or a path into one such as 'embed.external.uri'. Dates sort by time and numbers by value. Absent: by record key, which is time order for records keyed by time.",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "collection"
      ],
      "type": "object"
    },
    "main": {
      "description": "A box on Skywrite's dashboard: what it shows, and its settings. Skywrite's built-in widgets are records in skywritecms.bsky.social's repo; widgets someone adds are records in their own repo. The dashboard in us.polhem.skywrite.preferences.app places widgets by their AT URIs.",
      "key": "any",
      "record": {
        "properties": {
          "content": {
            "description": "What the box shows.",
            "refs": [
              "#quickCompose",
              "#recentDrafts",
              "#repoOverview",
              "#browseAccount",
              "#namespaceCollections",
              "#collectionRecords"
            ],
            "type": "union"
          },
          "description": {
            "description": "What the box is for, shown when choosing one to add.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "name": {
            "description": "The box's heading. Absent: one made from its content, such as 'Quick Compose: Document'.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "namespaceCollections": {
      "description": "The repo's collections in a namespace, such as every bsky.app collection (app.bsky) or just app.bsky.feed, each with how many records it has.",
      "properties": {
        "namespace": {
          "description": "An NSID prefix, such as 'app.bsky' or 'app.bsky.feed'. Collections whose NSID is the prefix or starts with it and a dot are listed.",
          "maxLength": 317,
          "type": "string"
        }
      },
      "required": [
        "namespace"
      ],
      "type": "object"
    },
    "quickCompose": {
      "description": "A box to write a new record in, publish straight away or keep as a draft to finish in the editor. Only on your own dashboard.",
      "properties": {
        "collection": {
          "description": "The collection new records are written to, such as app.bsky.feed.post or site.standard.document.",
          "format": "nsid",
          "type": "string"
        }
      },
      "required": [
        "collection"
      ],
      "type": "object"
    },
    "recentDrafts": {
      "description": "The drafts saved on this device most recently, to pick up again. Only on your own dashboard.",
      "properties": {},
      "type": "object"
    },
    "repoOverview": {
      "description": "Every app in the repo, with how many collections each has, and your drafts.",
      "properties": {},
      "type": "object"
    }
  },
  "id": "us.polhem.skywrite.preferences.widget",
  "lexicon": 1
}
```
