Skip to content

Add Supplemental File Guidelines page#2398

Open
luistoptal wants to merge 5 commits into
gigascience:developfrom
luistoptal:new-feature/2330-update-guidelines-page-content
Open

Add Supplemental File Guidelines page#2398
luistoptal wants to merge 5 commits into
gigascience:developfrom
luistoptal:new-feature/2330-update-guidelines-page-content

Conversation

@luistoptal

@luistoptal luistoptal commented Jul 3, 2025

Copy link
Copy Markdown
Collaborator

Pull request for issue: #2330

How to test?

docker-compose run --rm codecept run --no-redirect -g issue-2330 acceptance -vv

How have functionalities been implemented?

  • I choose to add a new page with the requested content rather than adding it to the existing guide page, it seemed like the best option to avoid making the guide page content very long-- it is already somewhat long
  • the issue mentions the possibility of using a collapsible widget to avoid showing all content at once, I think a new page is a more straighforward option that avoids complicating the layout
  • I have added the link to the new page as a new tab in the guide navigation, so the protected/components/GuideNavigation.php component is extended to include this new link
  • some of the new content has been added to the protected/views/site/guide.php page, alternatively it could be added to the new page altogether, and leave the guide page untouched (just with the new tab present in the navigation)
  • the new page makes use of a definition list (dl) to show the content. I was not satisfied by how the existing dl look like so I created a new style which I think is more readable and less crowded
  • Minor refactor on existing dl styles, putting them behind a class name so they are not applied by default

Any issues with implementation?

--

Any changes to automated tests?

Added one acceptance test to expect the presence of a link to the new page

Any changes to documentation?

--

Any technical debt repayment?

--

Any improvements to CI/CD pipeline?

--

Summary by CodeRabbit

  • New Features
    • Introduced a "Supplemental File Guidelines" page with detailed recommendations for supplemental file submissions.
    • Added a navigation tab and accessible link to the new guidelines page from the guide section.
  • Improvements
    • Updated guide content to clarify GigaScience’s approach to supplemental files.
    • Enhanced definition list styling for improved readability across help and FAQ pages.
  • Bug Fixes
    • Minor typographic correction in the guide’s metadata table.
  • Tests
    • Added acceptance test to verify navigation to the new guidelines page.
  • Documentation
    • Updated changelog to document the new feature.

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

A new "Supplemental File Guidelines" feature was introduced, including a dedicated page, navigation updates, access control, and acceptance tests. Guide and help pages were updated for content and style consistency, and CSS for definition lists was enhanced with new classes and styles.

Changes

Files/Paths Change Summary
CHANGELOG.md Added unreleased entry for "Supplemental File Guidelines" feature (#2330).
less/modules/definition-lists.less Updated and extended CSS for dl.inline-list and added new dl.definition-list styles.
playwright/paths.js Added /site/supplementalfileguidelines to PUBLIC_PATHS.
protected/controllers/SiteController.php Allowed public access to SupplementalFileGuide action; added actionSupplementalFileGuide() method.
protected/components/GuideNavigation.php Added $isActiveSupplementalFileGuide variable and passed it to the navigation view.
protected/views/guide/_guideNavigationView.php Added "Supplemental File Guidelines" tab; updated active state logic for navigation tabs.
protected/views/site/faq.php Added inline-list class to FAQ definition list.
protected/views/site/guide.php Updated introductory text; added section on supplemental file philosophy; linked to new guidelines page; minor typographic fix.
protected/views/site/help.php Added inline-list class to all relevant <dl> elements for consistent styling.
protected/views/site/supplementafileguide.php New view file: renders the Supplemental File Guidelines page with detailed content and navigation.
tests/acceptance/StaticContentNavigation.feature Added scenario to test for the "Supplemental File Guidelines" link on the guide page.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebApp
    participant SiteController
    participant ViewRenderer

    User->>WebApp: Navigate to /site/supplementalFileGuide
    WebApp->>SiteController: Calls actionSupplementalFileGuide()
    SiteController->>ViewRenderer: Render 'supplementafileguide' view
    ViewRenderer-->>User: Display Supplemental File Guidelines page
Loading

Possibly related issues

Suggested labels

pr:has-ui, pr:simple


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@luistoptal

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
protected/views/site/supplementafileguide.php (1)

7-10: Fix the breadcrumb array formatting.

The array formatting is broken across lines in an inconsistent way, making it hard to read.

-        $this->widget('TitleBreadcrumb', ['pageTitle' => 'GigaDB -
-    Supplemental File Guidelines', 'breadcrumbItems' => [['label' => 'Home',
-        'href'                                                            => '/'], ['isActive' => true, 'label' => 'Supplemental File
-    Guidelines', ]]]); ?>
+        $this->widget('TitleBreadcrumb', [
+            'pageTitle' => 'GigaDB - Supplemental File Guidelines',
+            'breadcrumbItems' => [
+                ['label' => 'Home', 'href' => '/'],
+                ['isActive' => true, 'label' => 'Supplemental File Guidelines']
+            ]
+        ]); ?>
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee58669 and 3f64fdc.

📒 Files selected for processing (11)
  • CHANGELOG.md (1 hunks)
  • less/modules/definition-lists.less (1 hunks)
  • playwright/paths.js (1 hunks)
  • protected/components/GuideNavigation.php (2 hunks)
  • protected/controllers/SiteController.php (2 hunks)
  • protected/views/guide/_guideNavigationView.php (1 hunks)
  • protected/views/site/faq.php (1 hunks)
  • protected/views/site/guide.php (2 hunks)
  • protected/views/site/help.php (8 hunks)
  • protected/views/site/supplementafileguide.php (1 hunks)
  • tests/acceptance/StaticContentNavigation.feature (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
`**/*`: - Focus on code smells, logic errors, edge cases, missing test cases, se...

**/*: - Focus on code smells, logic errors, edge cases, missing test cases, security flaws and serious issues

  • Avoid commenting on minor issues such as linting, formatting and style issues
  • Never commit secrets, PII, passwords or API keys—use env-vars and .env files.
  • Flag any file >300 lines or function >30 lines and suggest refactoring.
  • Every new feature or bug-fix must arrive with automated tests; warn if none are touched.
  • If the PR includes changes to the UI, the style guide should be updated too; warn if not.

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • protected/controllers/SiteController.php
  • CHANGELOG.md
  • protected/views/site/faq.php
  • tests/acceptance/StaticContentNavigation.feature
  • protected/components/GuideNavigation.php
  • protected/views/guide/_guideNavigationView.php
  • protected/views/site/help.php
  • playwright/paths.js
  • protected/views/site/supplementafileguide.php
  • protected/views/site/guide.php
  • less/modules/definition-lists.less
`**/*.php`: - HTML follows web accessibility WCAG 2 standards

**/*.php: - HTML follows web accessibility WCAG 2 standards

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • protected/controllers/SiteController.php
  • protected/views/site/faq.php
  • protected/components/GuideNavigation.php
  • protected/views/guide/_guideNavigationView.php
  • protected/views/site/help.php
  • protected/views/site/supplementafileguide.php
  • protected/views/site/guide.php
`**/*.js`: - New JavaScript must live in `giga/app/client/js/` (not in `protecte...

**/*.js: - New JavaScript must live in giga/app/client/js/ (not in protected/js/).

  • Write ES-module code (import…export) only—no global scripts.
  • Functions needing >2 logical params must take a single options object.
  • Rely on jQuery 3 or Vue for DOM work; avoid direct DOM APIs unless impossible.
  • No Console.log

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • playwright/paths.js
`**/*.less`: - Follow SMACSS: - Base: Default element styles - Layout: `.l-*...

**/*.less: - Follow SMACSS:

  • Base: Default element styles
  • Layout: .l-* classes for page skeleton
  • Modules: .my-module-* for reusable components
  • State: .is-* for UI states
  • Theme: .theme-* for theme overrides
  • Never hard-code colors, always use color variables defined in less/base/variables.less.
  • Desktop-first: media queries for mobile styles.
  • Limit nesting to three levels; favour flat selectors for maintainability.

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • less/modules/definition-lists.less
🧠 Learnings (4)
📓 Common learnings
Learnt from: rija
PR: gigascience/gigadb-website#2157
File: CHANGELOG.md:7-7
Timestamp: 2025-05-26T17:52:49.544Z
Learning: In the GigaDB project, textual changes to website content should be categorized as "Feat" (feature) entries in the CHANGELOG.md, not as "Docs" (documentation) entries, even when the changes involve updating guidance or instructional text on web pages.
Learnt from: alli83
PR: gigascience/gigadb-website#2301
File: protected/views/user/_form.php:179-187
Timestamp: 2025-05-23T02:02:48.284Z
Learning: The PR "Fix 561 separate admin user page from non admin user page" focuses specifically on separating admin user pages from non-admin user pages, removing terms and captcha requirements on update and change password pages, and adding token generation for activation links. Issues outside this scope should be addressed in separate PRs.
CHANGELOG.md (1)
Learnt from: rija
PR: gigascience/gigadb-website#2157
File: CHANGELOG.md:7-7
Timestamp: 2025-05-26T17:52:49.544Z
Learning: In the GigaDB project, textual changes to website content should be categorized as "Feat" (feature) entries in the CHANGELOG.md, not as "Docs" (documentation) entries, even when the changes involve updating guidance or instructional text on web pages.
protected/views/site/supplementafileguide.php (1)
Learnt from: rija
PR: gigascience/gigadb-website#2157
File: CHANGELOG.md:7-7
Timestamp: 2025-05-26T17:52:49.544Z
Learning: In the GigaDB project, textual changes to website content should be categorized as "Feat" (feature) entries in the CHANGELOG.md, not as "Docs" (documentation) entries, even when the changes involve updating guidance or instructional text on web pages.
protected/views/site/guide.php (1)
Learnt from: rija
PR: gigascience/gigadb-website#2157
File: CHANGELOG.md:7-7
Timestamp: 2025-05-26T17:52:49.544Z
Learning: In the GigaDB project, textual changes to website content should be categorized as "Feat" (feature) entries in the CHANGELOG.md, not as "Docs" (documentation) entries, even when the changes involve updating guidance or instructional text on web pages.
🔇 Additional comments (17)
CHANGELOG.md (1)

7-8: LGTM! Proper categorization and format.

The changelog entry correctly categorizes this as a "Feat" entry, which aligns with the established pattern for textual website content changes.

protected/views/site/faq.php (1)

499-499: LGTM! Consistent styling enhancement.

Adding the inline-list class aligns with the coordinated styling improvements across definition lists in the application.

playwright/paths.js (1)

33-33: LGTM! Proper accessibility testing integration.

The new path correctly adds the supplemental file guidelines page to the accessibility testing suite.

protected/components/GuideNavigation.php (1)

26-26: LGTM! Consistent pattern implementation.

The new $isActiveSupplementalFileGuide variable follows the exact same pattern as the existing $isActiveGeneral variable, maintaining consistency in the navigation logic.

Also applies to: 40-42

tests/acceptance/StaticContentNavigation.feature (1)

173-176: LGTM! Proper test coverage for new feature.

The acceptance test correctly verifies the presence of the supplemental file guidelines link with appropriate tagging and follows established patterns in the feature file.

protected/controllers/SiteController.php (2)

39-39: LGTM!

Access control properly updated to include the new action.


247-249: No view name typo—render call matches the existing file
The file protected/views/site/supplementafileguide.php exists with the same spelling, so the render call is correct as written. No changes needed.

Likely an incorrect or invalid review comment.

protected/views/site/help.php (1)

41-41: LGTM!

Consistent application of inline-list class to all definition lists for improved styling consistency.

Also applies to: 124-124, 215-215, 317-317, 667-667, 688-688, 731-731, 780-780

protected/views/guide/_guideNavigationView.php (1)

3-3: LGTM!

Navigation logic correctly implements mutual exclusivity for active states and follows established patterns for the new supplemental file guidelines tab.

Also applies to: 12-15

protected/views/site/guide.php (3)

27-27: Good generalization of the GigaDB description.

Removing the specific mention of China National GeneBank makes the description more universally applicable.


31-44: Excellent addition of supplemental files context.

This new section provides valuable guidance on how GigaScience Press handles supplemental files differently from traditional publishers. The explanation is clear and the link to the new guidelines page is well-placed.


136-136: Good typographical correction.

Replacing curly quotes with straight quotes improves consistency and readability.

protected/views/site/supplementafileguide.php (2)

23-183: Excellent use of semantic HTML and accessibility features.

The definition list structure is appropriate for this content, and the accessibility features (aria-labels, proper footnote implementation) follow WCAG guidelines well.


185-192: Good footnote implementation.

The footnote with back-reference link provides good accessibility and user experience.

less/modules/definition-lists.less (3)

1-25: Good refactoring to use specific class selector.

Changing from generic dl to dl.inline-list prevents unintended style application and follows good CSS practices. The use of color variables is also commendable.


16-20: Nice addition of the separator modifier.

The .separator-none modifier provides good flexibility for different use cases.


28-44: Well-designed definition list styles.

The new .definition-list styles provide good visual hierarchy with appropriate spacing and the left border visual cue.

@luistoptal
luistoptal marked this pull request as ready for review July 3, 2025 09:54
@luistoptal luistoptal moved this from Draft to Ready For Review in Backlog: Pull Requests Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

1 participant