-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting documents to tutorials or templates through the UI #1015
Comments
Are there specific conditions that need to be met in order for a document to be turned into a tutorial or template ? e.g. can you make a tutorial if there is no If so, we might need to think about helpful error messages :) |
Hmm, I think so, so I would say no need for handling error or exceptional cases. |
As a user I would think it's a bit hidden to put that in the settings, or at least it's not enough , I may think common user journey could be. :
|
Thanks for your feedback @lusebille!
Unfortunately, at least as of today, there is currently a subtlety: you must first create a regular document and prepare your template or tutorial. Only once it is ready, you may convert it to a tutorial or a template. Also if you want to modify a tutorial or a template, you should first convert it back to a regular doc.
Interesting. I would suggest doing that either in replacement of this issue or as a complement in another issue then, but it would be out of scope of the need as expressed at the beginning. Do you have any thoughts?
Yeah, you make a valid point! If I understand correctly, you would have liked to find the "export" as a menu item of a "file" button. Maybe we could create a meta-issue to track that? But also out of scope here (which does not mean it is not interesting!) |
BTW, it may be worth keeping in mind, as far as what's the common user journey, that very few documents are templates, and even fewer are tutorials. And few users would be creators of templates or tutorials, compared to all users creating Grist docs. On the other hand, these numbers will increase if this is made more convenient (but it would still be relatively uncommon). |
Working on this with @hexaltation |
@dsagal @paulfitz @lusebille @vviers |
I understand what is happening but could it be possible to have an anchor to the dropdown and not have this 'jump effect' when you're choosing a value ? |
Hi @hexaltation ! The demo makes sense. As far as the UI, I'd like to request a change. "Document Type" is not self-explanatory, and many users wouldn't know what it means. It would even be hard to figure out through experimentation. So.... to make it clearer, I suggest instead of a dropdown, a button that opens a larger modal, with each option explained, like for Formula Timer, with the radio buttons in the modal. I suggest calling option "Template mode", and the button could be "Change type". The explanations could be:
(The last part, I am actually unsure about, it may need a different explanation.) At the bottom, there would be a "Change type" and "Cancel" buttons. What do you think?
|
To discuss , here are the proposals : |
Ready from a designed point of view @hexaltation |
Design looks good -- thank you @lusebille ! I added some comments in Figma, to clarify the text and to point to how we show notification toasts. |
I added a comment in figma, but adding here as well, to update the text in the popup:
(Cc'ing @jr-grist) |
@dsagal Chiming in here with two proposed changes – (1) Instead of titling the dialog "Change document mode", I recommend "Change document type" (or "Change type of document" – indifferent on that one) Reason being: a document "type" better aligns with the language that the end user of a shared document would be familiar with, as opposed to "mode" which has more advanced/technical connotations within Grist. Would be best to align the language being used by creators/editors and viewers/invited or new users. (2) Under the "Regular document" option, I recommend changing the language as follows: "Regular document -- Normal document behavior**.** All users work on the same copy of the document." Small tweak to sound more natural. Looks good otherwise. |
Reopening, since #1181 was reverted due to an issue with the update API call failing in our testing of Grist SaaS. @hexaltation, part of the issue was how the call to update the document was being made. We confirmed that the diff below addresses the issue with the failing call:
I haven't followed the development of this feature closely, but one question I had was what the intended behavior of changing the document mode of a fork was? During testing, we weren't able to successfully round-trip a regular document to a tutorial and back (after applying the patch above). I imagine it's because the code above is not updating the trunk document's type when called from a fork document - was that the intended behavior? |
Hello @georgegevoian For the I'm a builder, I need to update the tutorial/template that is already shared with a lot of people having a link to it. I click on it, I go to document settings, I convert it back to normal to make persistent changes. When done I transform it back to tutorial. If it still don't make any sense, can you enlight me on what is the attended journey for such task? |
Waiting for the internal tests that were failing to be open-sourced. Otherwise it's hard for us to work on this feature. |
@georgegevoian @dsagal do you have some details on the failing tests? |
Got some details. The failing tests were:
So @fflorent the test is already open source. I'll try to figure out a way to run it to tickle the problem. You might already see the problem if you try running the code on your SaaS. |
One problem with this approach is that during the time you're making changes to the tutorial or template, anyone opening it will also open it as a regular document. A solution to this is to make the changes in a fork, and replace the original document. This should work for both tutorials and templates, as both should have a There's also the Are there other stories that require the document type to be modifiable from within a fork? If not, I wonder if it's best to not show it in those cases. A fork document modifying the trunk document should ideally only happen when you perform an operation like replace original (which explicitly warns you). It's not clear from the current UI that this is what will happen if you change the document type of a fork. Maybe it's best to only show the option when you're on the trunk, and require temporarily switching the document mode (e.g. |
I think the reason the failure isn't yet seen in grist-core is that multi-server testing isn't done yet for the github CI (needs port allocation that works with parallel mocha environment) https://github.com/gristlabs/grist-core/blob/main/test/nbrowser/testServer.ts#L128-L143 An awkward way to replicate the problem:
Visit Grist on port 8080. Make a doc, change it to tutorial, watch front-end browser logs. There's be a patch that 404s, and the document type won't persist. The port numbers simulate different parts of Grist being on different machines. |
It's possible though very technical to convert a document to a template or a tutorial: you have to make Rest API calls (
PATCH /docs/{docId}
with this body:{"type": "template"}
,{"type": "tutorial"}
or{"type": ""}
if you want to convert back to a regular document)It could be much more convenient, more user-friendly and more discoverable to allow changing the document type through the settings panel of the document.
The text was updated successfully, but these errors were encountered: