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

Clean URLs on proposal comment links and scroll proposal comment links into view #868

Merged
merged 9 commits into from
Jul 11, 2024

Conversation

petersalomonsen
Copy link
Collaborator

@petersalomonsen petersalomonsen commented Jul 10, 2024

Example of clean URL scrolling into the view:

image

https://devhublink.testnet.page/proposal/127?accountId=theori.near&blockHeight=121684702

Note that the usual practice would be to have accountId and blockHeight after a hash # and not the question mark ?, but since the highlighting functionality depends on reading this values, they have to be in the query string ( ? ).

Clicking the share button will now also copy the same URL to the clipboard.

image

The scrolling into view functionality depends on the web4 deployment and this PR in the contract: NEAR-DevHub/neardevhub-contract#142

Also updated documentation about deploying preview environments, since we need to combine bos cli (for deployment ) with bos-workspace build ( for applying replacements etc ).

Fixes #867

since the existing highlight functionality depends on getting accountId and blockheight through props
updated docs on building preview environments
@petersalomonsen petersalomonsen changed the title scroll proposal comment links into view Clean URLs on proposal comment links and scroll proposal comment links into view Jul 11, 2024
@petersalomonsen petersalomonsen marked this pull request as ready for review July 11, 2024 13:14
@petersalomonsen
Copy link
Collaborator Author

@Megha-Dev-19 @Tguntenaar See the updated docs on deploying preview environments, and also the fixes/improvements on the blog tests

Copy link
Collaborator

@Megha-Dev-19 Megha-Dev-19 left a comment

Choose a reason for hiding this comment

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

Looks great @petersalomonsen, thank you for updating the build script.

@Megha-Dev-19 Megha-Dev-19 merged commit ac43daf into main Jul 11, 2024
10 checks passed
@Megha-Dev-19 Megha-Dev-19 deleted the feat/proposal-comment-links branch July 11, 2024 14:11
frol pushed a commit to NEAR-DevHub/neardevhub-contract that referenced this pull request Jul 19, 2024
Enables "scroll into view" for proposal comments functionality for
NEAR-DevHub/neardevhub-bos#868

Example link to comment being scrolled into view:
https://devhublink.testnet.page/proposal/127?accountId=theori.near&blockHeight=121684702
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.

Clean URL links on proposal comments
2 participants