-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change
gnoweb
to add URL query string to render path (#2876)
### Description This PR introduces a change for _gnoweb_ to also pass the URL query string as part of the render path. Passing the URL query string is required to support arguments when rendering realms, which is the case of the AVL pager implementation in #2584 that uses "page" and "size". The PR changes the behavior of realm rendering calls by adding URL query arguments as suffix of the `path` argument, so URLs like `https://gno.land/r/demo/foo:bar?baz=42` would call `Render(path)` with "bar?baz=42" as value of `path`. It also changes how special _gnoweb_ arguments like `help` of `func` are specified which now must be done by using the `$` character, for example: - `https://gno.land/r/demo/foo$help&func=Bar&name=Baz` - `https://gno.land/r/demo/foo:example$tz=Europe/Paris` - `https://gno.land/r/demo/foo:example?value=42$tz=Europe/Paris` Note that `__func` is now `func`, without the underscore prefix. ### Possible Issues The change could potentially affect realm or package implementations that rely on the render path in cases where the `?` is not expected, for example when parsing or splitting it. Because of that there might be changes required to handle the case where a caller sends query string arguments. Realms and packages should be able to handle render paths which could look like `render/path?arg=1&arg=N`. Links that still use `?`, `help` and `__func` won't work as expected, they must be changed to use `$` instead of `?`, and `func` instead of `__func`. Packages `gno.land/p/moul/txlink` and `gno.land/p/moul/helplink` has to be refactored to properly generate links. --------- Co-authored-by: Leon Hudak <[email protected]> Co-authored-by: leohhhn <[email protected]> Co-authored-by: Manfred Touron <[email protected]>
- Loading branch information
1 parent
367408a
commit 538ebff
Showing
33 changed files
with
201 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.