-
Notifications
You must be signed in to change notification settings - Fork 382
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
feat(gnoweb): rework & Implement new gnoweb design #3195
Open
gfanton
wants to merge
101
commits into
gnolang:master
Choose a base branch
from
gfanton:feat/gnoweb-rework
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,668
−4,565
Open
Changes from 51 commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
af2112b
wip: rework gnoweb
gfanton f4f3a86
wip: create gnoweb app, sync gnodev with gnoweb
gfanton f3dbbf3
chore: cleanup
gfanton 5dd673d
wip: re-add status json page
gfanton 997ab46
chore: cleanup
gfanton a112a63
chore: clenaup
gfanton 5e13369
fix: height
gfanton a97d66d
feat: rework gnoweb
gfanton e53bbb4
chore: cleanup
gfanton 611e315
chore: cleanup
gfanton 2eaee06
chore: cleanup
gfanton 550055e
chore: telemetry link
alexiscolin 3f4a4bb
fix: fonts url
alexiscolin 60243f6
wip: source files
gfanton d08528b
feat: enable copy btn
alexiscolin 7c48c36
Merge branch 'feat/gnoweb-rework' of github.com:gfanton/gno into feat…
alexiscolin f7d708a
chore: clean logs
alexiscolin f6687ed
feat: copy feedback
alexiscolin d2345da
fix: client signer
gfanton b6e36a9
fix: test
gfanton 3b6369e
dir template
alexiscolin a95b5de
Merge branch 'feat/gnoweb-rework' of github.com:gfanton/gno into feat…
alexiscolin 801f1ba
feat: add line/kb counter in source
alexiscolin d1fe542
Merge remote-tracking branch 'origin/master' into feat/gnoweb-rework
gfanton 037e451
feat: status template
alexiscolin 8cea3ea
style: remove space
alexiscolin 555ac1c
content: update footer links
alexiscolin 7a80b4f
fix: cleanup col markdown for now
gfanton b39b8a1
fix: dir & cleanup
gfanton b1e06f3
chore: cleanup
gfanton 8db8d7e
Merge branch 'master' into feat/gnoweb-rework
gfanton dd88c32
chore: lint
gfanton d4b1210
feat: handle args
gfanton 6e9622f
fix: replace air by reflex
gfanton cff3730
chore: fixup comments
gfanton 58da650
fix: test
gfanton fc8ac17
chore: lint
gfanton c20a99b
chore: lint
gfanton c2b691c
Merge branch 'master' into feat/gnoweb-rework
gfanton 7a38df7
chore: update deprecated link
gfanton 33b333b
fix: redirect
gfanton 43f7880
fix: html & analytics
gfanton cf4b3d8
fix: gnoweb fmt
gfanton a683c96
fix: url test
gfanton 547c4e8
chore: lint
gfanton 45276d6
Merge branch 'master' into feat/gnoweb-rework
gfanton 58d9efc
feat: merge ts files
alexiscolin b95890a
fix: double script
alexiscolin e044ad9
fix: min-height footer
alexiscolin 0a5c720
fix: remove deprecated flags
gfanton 84ea845
Merge remote-tracking branch 'origin/master' into feat/gnoweb-rework
gfanton a970aa9
use commands.ExitCodeError instead of os.Exit
thehowl 36bbcb0
improve alias.go godoc
thehowl 3fcbdb6
AppConfig godoc; Remote -> NodeRemote
thehowl 0e8bf5e
avoid init function
thehowl 0ed44b3
more renames, more godoc
thehowl f0bde45
create per-test cfg/logger
thehowl 2e9f3cb
formater -> formatter
thehowl 4c3f6a1
DefaultHost -> DefaultChainDomain
thehowl 3445f52
ChainID typo fix
thehowl b93ae3d
remove unused KindUser
thehowl d3a0af7
change Kind to method
thehowl 203c5fe
simplify regex
thehowl d4d8645
took -> elapsed
thehowl 28dac08
ChainId -> ChainID
thehowl bc52d9b
remove empty send
thehowl d97f08f
some renaming
thehowl 949e90b
Merge pull request #16 from thehowl/dev/morgan/gnoweb-rework-pr
gfanton db88955
fix: remove buffer pool
gfanton 9e90280
fix: deadcode
gfanton ac19ef6
style: update italic and list
alexiscolin cbd3cd9
fix: add main test to actually test the setup
gfanton db59650
chore: lint
gfanton 4b1dd8a
chore: add minimal readme
gfanton 3ef80b2
fix: disable gnoweb setup if noweb is specified
gfanton 00e6ec4
chore: lint
gfanton 657ad8b
feat: add gnoweb generate to ci
gfanton 89724ab
chore: lts version
gfanton cbc4f9b
chore: make generate
gfanton f93398f
feat: highlight md
alexiscolin 5140676
chore: minify css
alexiscolin 50ab259
chore: move markdown package
gfanton 0a310bf
chore(gnoweb): update dev rule to build in a diffierent cache directory
gfanton e04b399
feat: move highlighting package inside our markdown package
gfanton d3ad8dd
fix: update markdown so it doesn't rebuild the source
gfanton 0d5f98f
feat: add title
alexiscolin 12e6ba3
fix: highlighting
gfanton 7993dc7
fix: no web
gfanton 5997c24
fix: make ci generate check more strict
gfanton 23d83d9
chore: make gnoweb less verbose
gfanton b135f5a
chore: lint
gfanton 023ca5b
chore: update readme
alexiscolin 3962d83
chore: ChainID -> ChainId
gfanton 92b8c87
chore: cleanup make
gfanton 92af050
chore: update test output
gfanton fb93d14
Merge branch 'master' into feat/gnoweb-rework
gfanton 142f74e
chore: clenaup readme
gfanton c981ce2
fix: analytics tests
gfanton 870d481
feat: add custom faucet url
gfanton ecd873f
chore: update faucet url
gfanton edceea3
fix: remove gotuna
gfanton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,27 +1,30 @@ | ||||||
package main | ||||||
|
||||||
import ( | ||||||
"fmt" | ||||||
"log/slog" | ||||||
"net/http" | ||||||
|
||||||
gnodev "github.com/gnolang/gno/contribs/gnodev/pkg/dev" | ||||||
"github.com/gnolang/gno/gno.land/pkg/gnoweb" | ||||||
gnoweb "github.com/gnolang/gno/gno.land/pkg/gnoweb" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
|
||||||
// setupGnowebServer initializes and starts the Gnoweb server. | ||||||
func setupGnoWebServer(logger *slog.Logger, cfg *devCfg, dnode *gnodev.Node) http.Handler { | ||||||
webConfig := gnoweb.NewDefaultConfig() | ||||||
func setupGnoWebServer(logger *slog.Logger, cfg *devCfg, dnode *gnodev.Node) (http.Handler, error) { | ||||||
remote := dnode.GetRemoteAddress() | ||||||
|
||||||
webConfig.HelpChainID = cfg.chainId | ||||||
webConfig.RemoteAddr = dnode.GetRemoteAddress() | ||||||
webConfig.HelpRemote = cfg.webRemoteHelperAddr | ||||||
webConfig.WithHTML = cfg.webWithHTML | ||||||
appcfg := gnoweb.NewDefaultAppConfig() | ||||||
appcfg.UnsafeHTML = cfg.webHTML | ||||||
appcfg.Remote = remote | ||||||
appcfg.ChainID = cfg.chainId | ||||||
if cfg.webRemoteHelperAddr != "" { | ||||||
appcfg.RemoteHelp = cfg.webRemoteHelperAddr | ||||||
} | ||||||
|
||||||
// If `HelpRemote` is empty default it to `RemoteAddr` | ||||||
if webConfig.HelpRemote == "" { | ||||||
webConfig.HelpRemote = webConfig.RemoteAddr | ||||||
router, err := gnoweb.MakeRouterApp(logger, appcfg) | ||||||
if err != nil { | ||||||
return nil, fmt.Errorf("unable to create router app: %w", err) | ||||||
} | ||||||
|
||||||
app := gnoweb.MakeApp(logger, webConfig) | ||||||
return app.Router | ||||||
return router, nil | ||||||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you tackle it in this PR? shouldn't be complex, no?