Repository navigation
Styles and row sorting for the Support Request Template generator - #39
Merged
Merged
Conversation
For phpbb/phpbb-website-private#226 (paul999/phpbb-website-private#28 and #29), which rebuilds the generator at /support/srt/ and lets the support team manage its questions in the team tools: - .srt-help and .srt-help-text: a question-mark icon that shows the help text on hover, or on a tap on touch screens. The rows are dl elements, and prosilver clears their floats with overflow: hidden, which would cut the text off; the wizard's dl rows clear with ::after instead. - .srt-buttons: Previous and Next together, Start over set apart. .srt-default-submit keeps the form's default button out of sight. - .srt-admin: layout of the admin pages, including the drag handles and drop targets that js/support/srt-admin.js switches on. - js/support/srt-admin.js: drag and drop sorting of questions (also between steps, submitted at once) and of a question's answers (by renumbering their order fields). Plain JavaScript, no library; the pages work without it. The old generator's body.support-template rules stay until its page is removed from phpbb/website. website.css?6 in index.css makes browsers fetch the new rules. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
From review: - A drag cancelled with Escape, or let go outside the tables, still saved the new order: dragover had already moved the row, and dragend submitted what it found. Rows now go back where they started unless they were dropped. - A click on a handle that never became a drag left the row draggable, so selecting text in its fields dragged it; mouseup resets that. - A second drag while the new order is being submitted is ignored, so it cannot add a second set of ids. - Drag events aimed at a text node no longer throw. - An invisible strip bridges the gap between the help icon and its box, so the box stays open while the pointer moves into it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The help-text paragraph spacing rules are overridden by the more-specific #main p selector.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds styling and drag-and-drop sorting for the rebuilt Support Request Template generator.
Changes:
- Adds generator help, button, and admin-page styles.
- Implements question and answer row sorting.
- Updates the stylesheet cache version.
File summaries
| File | Summary |
|---|---|
js/support/srt-admin.js |
Implements drag-and-drop sorting behavior. |
css/website.css |
Adds generator and admin styling; help-text paragraph selectors need higher specificity. |
css/index.css |
Updates the cache-busting version. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+2210
to
+2217
| .srt-help-text p { | ||
| margin: 0 0 0.5em; | ||
| } | ||
|
|
||
| .srt-help-text p:last-child, | ||
| .srt-help-text ul:last-child { | ||
| margin-bottom: 0; | ||
| } |
From review of #39: - The rules are only used by the Support Request Template pages, so they move out of website.css into their own css/srt.css, which those pages link themselves; website.css and index.css are back as they were. srt.css also carries the old generator's codebox, select and label rules the new page relies on, so they can go from website.css with the old page. - js/support/srt-admin.js uses the jQuery every page already loads instead of plain DOM calls. It behaves as before: rows are dragged by their handle, a cancelled drag puts the row back, and a new order is submitted once. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Styles and row sorting for the rebuilt Support Request Template generator: phpbb/phpbb-website-private#226, for paul999/phpbb-website-private#28 and #29.
The PR adds two new files and changes no existing ones.
css/srt.cssThe generator's own stylesheet. Only its pages link it (
/support/srt/and its pages in the team tools); it is not imported throughindex.css..srt-help,.srt-help-text): a question mark that shows the help text when hovered or tapped. The wizard's rows aredlelements, and prosilver clears their floats withoverflow: hidden, which would cut the box off. Those rows clear with an::afterinstead. An invisible strip keeps the box open while the pointer moves into it..srt-buttons): Previous step and Next step side by side, Start over set apart..srt-default-submitkeeps the form's default "Next" button off screen, so Enter moves forward..srt-admin): layout for the pages in the team tools:website.csstogether with the old page.js/support/srt-admin.jsDrag and drop sorting, built on the jQuery every page already loads.
After merging
Run
composer update phpbb/website-assetsin phpbb/phpbb-website-private (on #226). Also run it in phpbb/website, because.htdevserves/assets/from the old site's copy first.Checked
🤖 Generated with Claude Code