Skip to content

Conversation

@flacial
Copy link
Member

@flacial flacial commented Jun 26, 2023

Overview

This PR polishes and redesign the lesson sidebar by putting it inside a container to differentiate it from other elements, making it sticky so the student can easily navigate the lesson sections, and finally removing the remark-toc as it's now replaced with an in-house solution.

Changes

  • Extract the headings from an mdx source using gray-matter
  • Update the sidebar UI
  • Add new tests cases to the subLesson test file to cover the new changes
  • Remove the text "Table of Contents" from all mdx files so it doesn't show in the compiled source
  • Update snapshots

Images

Before

image

After

image

On mobile

image

Subsequent changes

  • Remove the package remark-toc
  • Redesign the mobile view to make it collapsable
  • Highlight the currently viewed section in the sidebar

Related issues

@vercel
Copy link

vercel bot commented Jun 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
c0d3-app ❌ Failed (Inspect) Mar 19, 2024 3:17pm

@vercel
Copy link

vercel bot commented Jun 26, 2023

@flacial is attempting to deploy a commit to the c0d3-prod Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #3080 (5d516f1) into master (c0c4213) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5d516f1 differs from pull request most recent head f08b122. Consider uploading reports for the commit f08b122 to get more accurate results

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #3080   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          191       191           
  Lines         3622      3632   +10     
  Branches       988       990    +2     
=========================================
+ Hits          3622      3632   +10     
Impacted Files Coverage Δ
helpers/static/lessons.ts 100.00% <ø> (ø)
helpers/static/parseMDX.ts 100.00% <ø> (ø)
pages/curriculum/[lessonSlug]/[subLessonSlug].tsx 100.00% <100.00%> (ø)

@flacial flacial merged commit 495e63f into garageScript:master Jun 28, 2023
@flacial flacial deleted the improve-sidebar branch June 28, 2023 18:22
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.

2 participants