Skip to content

Preserve URL hash when updating query parameters#3240

Merged
knolleary merged 1 commit into
mainfrom
3231-add-an-anchor-link-to-the-feature-comparison-section-of-pricing-page
May 9, 2025
Merged

Preserve URL hash when updating query parameters#3240
knolleary merged 1 commit into
mainfrom
3231-add-an-anchor-link-to-the-feature-comparison-section-of-pricing-page

Conversation

@Yndira-E
Copy link
Copy Markdown
Contributor

@Yndira-E Yndira-E commented May 9, 2025

Description

This PR ensures that the URL hash (e.g., #feature-comparison-table) is preserved when updating query parameters using window.history.replaceState. Previously, the hash was lost, causing navigation issues. The solution appends the current hash to the updated URL, maintaining proper functionality for anchor links.

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • I have considered the performance impact of these changes
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated

@Yndira-E Yndira-E linked an issue May 9, 2025 that may be closed by this pull request
@Yndira-E
Copy link
Copy Markdown
Contributor Author

Yndira-E commented May 9, 2025

@MichaelBDavis for testing the cloud features table, use this URL: https://deploy-preview-3240--flowforge-website.netlify.app/pricing/#feature-comparison-table

And for self-hosted, use this one: https://deploy-preview-3240--flowforge-website.netlify.app/pricing/?hosting=self-hosted#feature-comparison-table

Once merged, the URLs for sharing will be:

The anchor was already in place but only worked for cloud. This change ensures it works for self-hosted as well.

@Yndira-E Yndira-E requested a review from MichaelBDavis May 9, 2025 15:45
@knolleary knolleary merged commit 7f07145 into main May 9, 2025
5 checks passed
@knolleary knolleary deleted the 3231-add-an-anchor-link-to-the-feature-comparison-section-of-pricing-page branch May 9, 2025 16:52
@knolleary
Copy link
Copy Markdown
Member

(spotted this as I was passing by - given the technical nature, figured Michael would appreciate an independent review. Looks good)

@Yndira-E
Copy link
Copy Markdown
Contributor Author

Yndira-E commented May 9, 2025

Thanks Nick!

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.

Add an anchor link to the Feature Comparison section of pricing page

2 participants