Skip to content

refactor(RemixerDashboard): enhance matter item handling and improve …#853

Merged
jakeaturner merged 4 commits into
stagingfrom
remixer
Jul 11, 2026
Merged

refactor(RemixerDashboard): enhance matter item handling and improve …#853
jakeaturner merged 4 commits into
stagingfrom
remixer

Conversation

@yghaemi

@yghaemi yghaemi commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

…UI interactions

  • Introduced isDefaultMatterItem function to identify default matter items.
  • Updated context menu logic to prevent actions on default matter items.
  • Modified delete and edit handling to skip default matter items.
  • Improved interaction locking for default matter items in the tree structure.
  • Adjusted cursor styles for visual feedback on locked items.
  • Refactored code for better readability and maintainability.

…UI interactions

- Introduced `isDefaultMatterItem` function to identify default matter items.
- Updated context menu logic to prevent actions on default matter items.
- Modified delete and edit handling to skip default matter items.
- Improved interaction locking for default matter items in the tree structure.
- Adjusted cursor styles for visual feedback on locked items.
- Refactored code for better readability and maintainability.
@yghaemi yghaemi requested a review from jakeaturner July 10, 2026 22:51
yghaemi added 2 commits July 10, 2026 19:15
…fications

- Added `IconAlertTriangle` to indicate pages not found in the book table of contents.
- Implemented logic to track and display orphaned pages in the glossary.
- Introduced `bookTOC` prop to pass the table of contents to the `GlossaryList` component.
- Improved user feedback for missing pages with visual cues and tooltips.
…styling

- Enhanced `GlossaryDefinitionPreview` to accept an optional `className` prop for additional styling.
- Updated the rendering logic to conditionally apply the provided className.
- Improved the `GlossaryList` component to display orphaned page notifications with visual cues and tooltips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors Remixer UI behavior around front/back matter nodes (default vs user-added) and adds additional server/client-side tweaks, including remixer path/tag handling and glossary UI indicators for TOC-missing pages.

Changes:

  • Added “default matter item” detection and used it to lock/disable edit/delete/duplicate actions in RemixerDashboard and the book tree UI.
  • Updated remixer server logic to pad page path numbering and to preserve page tags during import (including transcluded yes/no tagging).
  • Enhanced Glossary UI to flag glossary usages pointing to pages missing from the book TOC, and added styling hooks to the definition preview component.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
server/util/remixerutils.ts Pads numbering when building remixer page path segments.
server/api/services/remixer-service.ts Preserves tags on imported pages and refactors several URL/path handling blocks.
client/src/screens/commons/Glossary/index.tsx Passes TOC data into the glossary list (now redundantly).
client/src/screens/commons/Glossary/GlossaryList.tsx Adds TOC membership indicators, but currently breaks page title rendering.
client/src/screens/commons/Glossary/GlossaryDefinitionPreview.tsx Adds optional className passthrough for styling.
client/src/components/remixer/RemixerDashboard.tsx Introduces isDefaultMatterItem and skips actions for default matter items.
client/src/components/remixer/BookContent/TreeNodeContainer.tsx Adjusts cursor style for visually locked nodes.
client/src/components/remixer/BookContent/Dashboard.tsx Refines interaction locking rules for matter roots vs descendants and updates selection/double-click behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +88 to +102
cell: ({ getValue }) => {
const pageID = getValue() as string;
const missingFromToc = toc != null && !tocIdSet.has(pageID);
return (
<span
className={`flex items-center gap-1 break-words whitespace-normal text-xs${missingFromToc ? " text-amber-600" : ""}`}
title={missingFromToc ? "This page is not in the book table of contents" : undefined}
>
{"Removed Page"}
{missingFromToc && (
<IconAlertTriangle size={12} className="shrink-0" />
)}
</span>
);
},
Comment on lines 24 to 28
addNotification: (notification: Notification) => void;
refetchGlossary: () => void;
setEditingUsageID: (usageID: string) => void;
bookTOC: TableOfContents;
};
Comment on lines 231 to 235
addNotification={addNotification}
refetchGlossary={refetchGlossary}
setEditingUsageID={handleEditUsageID}
bookTOC={bookTOC!}
/>
Comment thread server/api/services/remixer-service.ts
Comment on lines +719 to +739
const targetService = new BookService({
bookID: `${subdomain}-${pageID}`,
});
try {
if (shouldTransclude){
// make sure transcluded:yes is in the tags
if (!preservedTags.includes("transcluded:yes")){
preservedTags.push("transcluded:yes");
}

}
else{
// make sure transcluded:no is in the tags
if (!preservedTags.includes("transcluded:no")){
preservedTags.push("transcluded:no");
}
}
await targetService.updatePageDetails(pageID, undefined, preservedTags);
} catch (error) {
console.error(error);
}
@jakeaturner jakeaturner merged commit 09ae25b into staging Jul 11, 2026
5 checks passed
@jakeaturner jakeaturner deleted the remixer branch July 11, 2026 17:03
@libretexts-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.135.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants