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

feat(gnoweb): source code viewer improvements #2757

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

0xtekgrinder
Copy link

@0xtekgrinder 0xtekgrinder commented Sep 4, 2024

Improve the source code viewer with several changes:

  • Fix & instead of &;
  • Add a link to imported modules
  • Add a a line counter

closes #2746

image
image

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Sep 4, 2024
@0xtekgrinder
Copy link
Author

0xtekgrinder commented Sep 4, 2024

So far, I have added a line counter but I don't really see how we can achieve a permalink as we sanitize the html removing all onclick attributes so we cannot really do simple highlighting logic + copying permalink

@moul @zivkovicmilos

@0xtekgrinder 0xtekgrinder changed the title Fix/source-code-improvements feat(gnoweb): source code viewer improvements Sep 4, 2024
@0xtekgrinder 0xtekgrinder marked this pull request as ready for review September 4, 2024 16:16
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.86%. Comparing base (01ee5a9) to head (37abf1c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2757      +/-   ##
==========================================
+ Coverage   60.84%   60.86%   +0.01%     
==========================================
  Files         563      563              
  Lines       75190    75190              
==========================================
+ Hits        45753    45766      +13     
+ Misses      26068    26057      -11     
+ Partials     3369     3367       -2     
Flag Coverage Δ
contribs/gnodev 60.65% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 67.17% <ø> (ø)
misc/logos 20.23% <ø> (+0.35%) ⬆️
tm2 62.10% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leohhhn
Copy link
Contributor

leohhhn commented Sep 12, 2024

Hey, checked out gnoweb with this PR. Seems that the import links only work for the first link in the series. Take a look and see if you can fix this. Also, it would be great if the imports weren't constantly underlined, but only upon mouse hover.
Also, when you underline them, I think excluding the quotation marks looks a bit better :)

Screenshot 2024-09-12 at 13 24 57

@0xtekgrinder
Copy link
Author

Hello @leohhhn I have fixed the import of link only for the first + implemented the style overhaul you suggested

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. Some work needed; let's focus on the esthetical changes for now and we can tackle the imports at a later time.

@Kouteki Kouteki added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 3, 2024
@jefft0 jefft0 removed the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 4, 2024
@jefft0
Copy link
Contributor

jefft0 commented Oct 4, 2024

Removed the "review team" label because this is already reviewed by core devs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: In Progress
Status: In Review
5 participants