-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow disabling the "Open preview" button in the
PageTree
for certa…
…in document types (#2054) The "Open preview" button is shown for all document types in the `PageTree`. But some document types (e.g., links) don't have a preview. Clicking on the preview button causes an error. Now, it's possible to disable the button by setting `hasNoPreview` for the document: ```diff export const Link: DocumentInterface<Pick<GQLLink, "content">, GQLLinkInput> = { // ... + hasNoSitePreview: true, }; ``` (For now the button is disabled. I already asked UX for a crossed-out Preview icon)
- Loading branch information
1 parent
8e3dec5
commit e10753b
Showing
5 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
"@comet/cms-admin": minor | ||
--- | ||
|
||
Allow disabling the "Open preview" button in the `PageTree` for certain document types | ||
|
||
The "Open preview" button is shown for all document types in the `PageTree`. | ||
But some document types (e.g., links) don't have a preview. | ||
Clicking on the preview button leads to an error page. | ||
|
||
Now, it's possible to disable the button by setting `hasNoSitePreview` for the document: | ||
|
||
```diff | ||
export const Link: DocumentInterface<Pick<GQLLink, "content">, GQLLinkInput> = { | ||
// ... | ||
+ hasNoSitePreview: true, | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters