Skip to content
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

Remove 'try as tutorial' link/button for docview #6666

Closed
wants to merge 1 commit into from

Conversation

ganicke
Copy link
Collaborator

@ganicke ganicke commented Feb 3, 2025

Remove the "Try this tutorial" button/links due to malformed URL's when opened in sidedocs vs. docs view. If it's desired to keep these, then we could modify the open url logic in the render.

image

Erroneous URL formed from sidedocs view:

https://arcade.makecode.com/---docs#doc:#tutorial:/tutorials/chase-the-pizza

...from markdown:

### ~button /#tutorial:/tutorials/chase-the-pizza

Try this tutorial!

### ~

RE: #6604 (comment)

@ganicke ganicke changed the title Remove 'try as tutorial' link/button in for docview Remove 'try as tutorial' link/button for docview Feb 3, 2025
@kiki-lee
Copy link
Contributor

kiki-lee commented Feb 3, 2025

I would much rather that we fixt the URL

@Jaqster
Copy link
Member

Jaqster commented Feb 4, 2025

There's a lot wrong with these pages (in addition to the link being wrong in the side docs view).
For example, for this page https://arcade.makecode.com/tutorials/chase-the-pizza I saw -

  • some markdown tags not getting parsed correctly
    image

  • some emojis not showing up
    image

  • weird nested table for each step
    image

  • some blocks not rendering correctly and then showing up throughout the tutorial steps
    image

  • bullet point formatting in some places
    image

I'm trying to pull some metrics to see how popular these pages are and whether it's worth it to fix them or just trash them.

@ganicke
Copy link
Collaborator Author

ganicke commented Feb 4, 2025

The document renderer hasn't kept up with the markdown changes to support tutorials. These don't really serve as document pages as they are almost always launched as tutorials. In the past, there was parity with viewing tutorial markdown as a page and running it as a tutorial. We're past that now. Maybe it's time to implement something like ### @tutorialOnly true in the markdown so it's "virtually" removed from the document space.

@Jaqster
Copy link
Member

Jaqster commented Feb 4, 2025

Okay, let me pull the usage data, and we can figure out what we want to do here based on that.

@Jaqster
Copy link
Member

Jaqster commented Feb 7, 2025

Okay, so it looks like a significant amount of people in the last month went to these pages. So we can't kill them. @ganicke - what's the minimal amount of work we could do to update the renderer (or just manually fix a couple of the most popular tutorial docs pages)? I do think having a @Tutorialonly flag going forward would be good too.

@ganicke
Copy link
Collaborator Author

ganicke commented Feb 7, 2025

@Jaqster - I guess these standalone tutorials still have some longevity to them. Since they've been optimized by @kiki-lee as tutorials, I'd hate to modify them down just so they render well as doc pages.

Hmm, let's see what we might do -

  1. We could remove ./tutorials/ from the document tree such that this subpath is only valid for non-document type requests (using an exclusion rule, redirect, etc.).
  2. We could make document view only versions (copies) of these, put them in their own subpath ./tutorial-pages/, and dumb down the markdown a bit to make the render work properly.
  3. Update the render code to better display (document view) the markdown elements that aren't working now (headings, emojis, that crazy div stacking, etc). This is a bit of dev work.

@Jaqster
Copy link
Member

Jaqster commented Feb 7, 2025

@riknoll - do you have a feel for the level of effort option 3 would be to update the docs markdown renderer? If it's too much work, then I would say option 2 sounds good if we can redirect (I don't know how people are finding these links).

@riknoll
Copy link
Member

riknoll commented Feb 10, 2025

it's a decent chunk of work, but probably a good idea in the long term. i'd really like to see us unify our markdown parsing code a bit more. right now it's split between the webapp and our docs code which is why we have disparities like this.

that being said, it's probably too much work for this release. we should still plan to do this at some point though.

@Jaqster
Copy link
Member

Jaqster commented Feb 10, 2025

Okay. I just created a bug so we don't lose it for next time - #6676. Galen, you can probably just close this PR.

@ganicke
Copy link
Collaborator Author

ganicke commented Feb 11, 2025

Close this PR as updates to doc rendering will address the problems discussed here.

@ganicke ganicke closed this Feb 11, 2025
@ganicke ganicke deleted the remove-doc-to-tutorial-links branch February 11, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants