Skip to content

Re-arrange sections and lessons#747

Open
rajat1saxena wants to merge 1 commit intomainfrom
issue-556
Open

Re-arrange sections and lessons#747
rajat1saxena wants to merge 1 commit intomainfrom
issue-556

Conversation

@rajat1saxena
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
courselit-docs Ready Ready Preview, Comment Mar 23, 2026 7:29pm

Request Review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 141471c174

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +941 to +949
const updatedGroups = (course.groups ?? []).map((group) => {
const plainGroup =
typeof (group as any).toObject === "function"
? (group as any).toObject()
: { ...group };

return {
...plainGroup,
rank: rankByGroupId.get(group.id) ?? group.rank,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Persist the reordered group list, not just new ranks

This only changes each group's rank; it leaves the groups array itself in the original order. Existing readers such as packages/page-blocks/src/blocks/content/widget.tsx still render course.groups exactly as GraphQL returns them, so a successful reorder here will not change the section order in that widget (and any similar unsorted consumer) until they are separately updated. Either persist the array in the new order or sort by rank in the shared course formatter so the mutation is observable everywhere.

Useful? React with 👍 / 👎.

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.

1 participant