-
-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Context When previewing the URL of an instance (say https://docs.getgrist.com/ ) in websites or apps, it simply displays "Loading..." without any further description or images. It's quite confusing. See #1242 for detailed steps to reproduce. ## Proposed solution - the description defaults to "Grist is the evolution of spreadsheets." and is translatable - the icon defaults to `statics/img/opengraph-preview-image.png` (introduced in this PR) - the title in meta descriptions defaults to `Grist, the evolution of spreadsheet`, and to `[doc name] - Grist` if a document is consulted. **Also a technical note**: I had to change the way requestUtils deduce the host of the home, so it takes into account the port. Otherwise [this test failed](https://github.com/gristlabs/grist-core/blob/e9b5b98bcb35e1c9ae9e82eac6e7e8886891cfb4/test/nbrowser/AdminPanel.ts#L337-L343) with my change, as I now specify the absolute URL for serving static resources (needed for specifying the opengraph icon). ## Related issues Fixes #1242 ## Has this been tested? <!-- Put an `x` in the box that applies: --> - [x] 👍 yes, I added tests to the test suite - [ ] 💭 no, because this PR is a draft and still needs work - [ ] 🙅 no, because this is not relevant here - [ ] 🙋 no, because I need help <!-- Detail how we can help you --> ## Screenshots / Screencasts Here is how the preview of the instance link looks like on Signal: ![preview home page](https://github.com/user-attachments/assets/d2600441-e120-4e76-975e-23b4a07598ec) And how it looks like when previewing a document (:warning: **Important**: it must be shared publicly to obtain this result): ![preview doc title](https://github.com/user-attachments/assets/6ddd7f5e-6f44-4ba6-87c9-55a9d660696c) You also may check this website which seems to show the rendering of URL previews on different websites: https://opengraph.dev/ Home page: https://opengraph.dev/panel?url=https%3A%2F%2Fgrist-fflorent-grist-core-issue-1242-url-preview.fly.dev%2F Doc page title: https://opengraph.dev/panel?url=https%3A%2F%2Fgrist-fflorent-grist-core-issue-1242-url-preview.fly.dev%2FnbutBLRC2wSD%2Fpublic-doc --------- Co-authored-by: Emmanuel Pelletier <[email protected]>
- Loading branch information
1 parent
50d8713
commit d06def9
Showing
6 changed files
with
78 additions
and
28 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
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
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
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