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

Group hints together outside of document's body #3284

Closed
wants to merge 2 commits into from

Conversation

heiwiper
Copy link
Contributor

@heiwiper heiwiper commented Dec 8, 2023

Description

This PR moves all the hints that were previously children of the document's body under a new element which is sibling of body.

Fixes #3261

Discussion

There was a discussion in #3261 about whether the new element that is the parent of hints should be a shadow root in order to encapsulate the style of hints. For now this PR seems to work just fine, I have inspired mostly from LinkHints extension which unsets styling of the hints parent but also uses a shadow root, so there might be an actual good reason for using encapsulation.

Checklist:

Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.

  • Git hygiene:
    • I have pulled from master before submitting this PR
    • There are no merge conflicts.
  • I've added the new dependencies as:
    • ASDF dependencies,
    • Git submodules,
      cd /path/to/nyxt/checkout
      git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
    • and Guix dependencies.
  • My code follows the style guidelines for Common Lisp code. See:
  • I have performed a self-review of my own code.
  • My code has been reviewed by at least one peer. (The peer review to approve a PR counts. The reviewer must download and test the code.)
  • Documentation:
    • All my code has docstrings and :documentations written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)
    • I have updated the existing documentation to match my changes.
    • I have commented my code in hard-to-understand areas.
    • I have updated the changelog.lisp with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).
      • Changelog update should be a separate commit.
    • I have added a migration.lisp entry for all compatibility-breaking changes.
    • (If this changes something about the features showcased on Nyxt website) I have these changes described in the new/existing article at Nyxt website or will notify one of maintainters to do so.
  • Compilation and tests:
    • My changes generate no new warnings.
    • I have added tests that prove my fix is effective or that my feature works. (If possible.)
    • I ran the tests locally ((asdf:test-system :nyxt) and (asdf:test-system :nyxt/gi-gtk)) and they pass.

@aadcg
Copy link
Member

aadcg commented Dec 11, 2023

Pushed to master via commits 6f3f346 and 3c40dbb. In the latter commit, I've fixed the changelog entry. Thanks @heiwiper! Amazing work, as always.

but also uses a shadow root, so there might be an actual good reason for using encapsulation.

I think that we need to make the transition to a shadow root at some point, but it requires more work than the major and yet low-effort improvement presented in this PR. The top priority here was to prevent embarrassing bugs such as #3261. See #3285.

Nonetheless, with respect to hint-mode, #3254 is undoubtedly the highest priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Hints are not visible on Bing Chat
2 participants