Skip to content

code changes from key's pr#477

Closed
itszubariel wants to merge 1 commit into
NilPointer-Software:devfrom
itszubariel:code-changes
Closed

code changes from key's pr#477
itszubariel wants to merge 1 commit into
NilPointer-Software:devfrom
itszubariel:code-changes

Conversation

@itszubariel

Copy link
Copy Markdown
Contributor

separated the code changes from rainbow key's pr (#463),

original pr by @Rainb0wKey.

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 separates and lands UI/theme changes from the earlier “New UI features” work (#463), focusing on improved navigation UX, code-block presentation, and page metadata (“Last edited”) for the wiki theme.

Changes:

  • Adds a client-side “Last edited” block (via GitHub API) and restructures some function-page header content.
  • Reworks code block rendering to include line numbers and updates copy/wrap behaviors accordingly.
  • Updates multiple CSS files for mobile/layout polish (tables, headings, nav buttons, Discord message styling), and removes legacy beta-tag styling and the template edit-link.

Reviewed changes

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

Show a summary per file
File Description
src/theme/settings/style.css Removes legacy .tag-beta styling from settings theme.
src/theme/settings/code-hg.js Reworks code rendering to add line numbers and per-line wrappers.
src/theme/settings/apply-settings.js Adds “Last edited”, nav text enhancements, redirects/link rewriting, and applies settings on DOMContentLoaded.
src/theme/index.hbs Removes the static edit-link from the template main area.
src/theme/css/wiki-themes/discord-messages.css Tweaks Discord message/system message styling and some component borders.
src/theme/css/home.css Hides .last_file_edit on home and adjusts home page h1 overflow behavior.
src/theme/css/general.css Adds table wrapper support and adjusts table/heading styles for responsiveness.
src/theme/css/chrome.css Adds styling for the new “Last edited” block, navigation buttons, and new code container layout.
src/theme/book.js Updates clipboard copy and wrap logic to work with the new code-line layout.

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

Comment on lines +535 to +539
const html = document.querySelector("html");

html.style.fontFamily = data["text-font"];
html.style.fontSize = data["text-size"];
html.style.textShadow = data["text-hg"];
Comment on lines +474 to +476
if (styles.background)
mutation.target.style.background = styles.background;
mutation.target.style.backgroundColor = styles.exampleColor;
Comment on lines +514 to +517
for (message of discordMessages) {
const mutObv = new MutationObserver(callback);
mutObv.observe(message, { attributes: true });
}
Comment thread src/theme/book.js
Comment on lines +275 to +291
wrapButtons.forEach((button) => {
button.addEventListener("click", (e) => {
const playground = button.closest("pre");
const codeContainer = playground.querySelector(".code-container");
const lineNumbers = codeContainer.querySelectorAll(".line-number");
const codeLines = codeContainer.querySelectorAll(".code-line");

codeContainer.classList.toggle("wrap-enabled");

codeLines.forEach((line, index) => {
if (lineNumbers[index]) {
const lineHeight = line.scrollHeight;
lineNumbers[index].style.height = lineHeight + 'px';
}
});
});
});
Comment thread src/theme/book.js
Comment on lines +246 to +249
const lines = [];
codeLines.forEach(line => {
lines.push(line.textContent);
});

@kubastick kubastick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See copilot comments

@itszubariel itszubariel closed this Jul 6, 2026
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.

3 participants