Skip to content

Conversation

@vemonet
Copy link
Contributor

@vemonet vemonet commented Mar 10, 2025

Remove a line that is clearing the hash fragment in the window URL for no reason. There are no comments in the code about why they did that. And I don't see why it is need. Anyway wherever this line is there or not, adding a # fragment is breaking the ability of Yasgui to use query params (e.g. ?query), so removing the hash does not do anything apart from introducing unwanted side effects and removing freedom from developers using Yasgui. Some developers deploying Yasgui might want to use the #, in our case it will allow to link to specific example queries so that they can be shared using their IRI

Also improved a bit the readme docs to run tests

@ludovicm67

…r no reason. Wherever this line is there or not, adding a # fragment is anyway breaking the ability of Yasgui to use query params (e.g. ?query), so removing the hash does not do anything apart from introducing unwanted side effects and removing freedom from developers using Yasgui. Also improved a bit the readme docs to run tests
@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: 6e842bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

//firefox does some decoding if we're using window.location.hash (e.g. the + sign in contentType settings)
//Don't want this. So simply get the hash string ourselves
url.query(url.anchor());
if (urlFromWindow) window.location.hash = ""; //clear hash
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for the PR and also for the documentation improvements.

I understand the reason why the removal of the hash from the URL could impact some websites, but this was the behavior since years. Changing this would also have unexpected effects for current solutions.

An alternative could be to add an explicit configuration parameter ; by default it keeps the current behavior, and if this new configuration option is set, then that hash clearing could be ignored.

@vemonet do you think it could make sense?
That way we have something that is still behaving the way people expect, and for people having an issue with the current behavior could easily just explicitly tell Yasgui to not remove the hash.

Could you update this PR to integrate that suggestion?

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