fix: Command bar should bust cache when docs and collections are renamed

fix: Command bar should get larger on large screens
fix: Editable titles in sidebar should enforce max length
This commit is contained in:
Tom Moor
2021-10-24 17:26:35 -07:00
parent 7f3df8158a
commit 2e56bdc388
6 changed files with 20 additions and 4 deletions

View File

@@ -18,7 +18,9 @@ export const openCollection = createAction({
const collections = stores.collections.orderedData;
return collections.map((collection) => ({
id: collection.id,
// Note: using url which includes the slug rather than id here to bust
// cache if the collection is renamed
id: collection.url,
name: collection.name,
icon: <DynamicCollectionIcon collection={collection} />,
section: CollectionSection,

View File

@@ -23,7 +23,9 @@ export const openDocument = createAction({
return paths
.filter((path) => path.type === "document")
.map((path) => ({
id: path.id,
// Note: using url which includes the slug rather than id here to bust
// cache if the document is renamed
id: path.url,
name: path.title,
icon: () =>
stores.documents.get(path.id)?.isStarred ? (