Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide draft list on idividual hip pages #1123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mgarbs
Copy link
Collaborator

@mgarbs mgarbs commented Feb 14, 2025

Remove Draft HIPs Display from Individual HIP Pages

Problem

Currently, the draft HIPs section is being displayed on every page of the site, including individual HIP pages. This creates unnecessary clutter and confusion, as the draft section should only appear on the main HIPs listing page.

Solution

  • Modified pr-integration.js to check the current page before initializing
  • Updated default.html to conditionally load HIP-related scripts
  • Added page detection logic to ensure draft HIPs only display on the main page
  • Improved script loading efficiency by only including necessary scripts per page

Implementation Details

  • Added isHipTablePage() method to verify current page context
  • Implemented conditional script loading in default.html
  • Added unique ID to styles to prevent duplication
  • Maintained all existing functionality on the main HIPs page

Testing

  • Verified draft HIPs only appear on the main page
  • Confirmed all functionality works as expected on the main page
  • Tested navigation between pages to ensure proper script loading
  • Verified no regressions in existing features

Related Issues

Resolves issue with draft HIPs appearing on all pages

Copy link

netlify bot commented Feb 14, 2025

Deploy Preview for hedera-hips ready!

Name Link
🔨 Latest commit 8a4a4c1
🔍 Latest deploy log https://app.netlify.com/sites/hedera-hips/deploys/67af7a2024670c00081d2925
😎 Deploy Preview https://deploy-preview-1123--hedera-hips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@sergmetelin sergmetelin left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants