Repository navigation
feat(elements): typed Slot_style for restricted slot constructors - #398
Merged
Merged
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 5 findings. Devin automatically fixed all 5 findings.
Fixed by Devin (5)
- Native menu styling limits are undocumented — Documented which renderers draw each prop.
- Web defaults mask standalone menu colors — Each hover/focus override now wins on its own; tests cover each prop alone.
- Focus test accepts an unpainted background — The test now asserts the exact muted color in light and dark.
- Untested keyboard path for hover text — Added a keyboard test that arrows through a dropdown and checks data-highlighted.
- Unreadable menu labels on keyboard focus — An authored focus background without a foreground override now uses the normal foreground.
Contributor
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Bulk keyed mounts grow rollback journals — Reverted the direct keyed-placement change, so keyed_range is back to its base implementation.
- Failed row mounts reject Apple updates — Reverted the direct keyed-placement change that left the node live on a failed mount.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The restricted-slot changes (ADR 0007) made
menu_card,dropdown_menu,menu_triggerandtoolbaraccept only slot types such asdropdown_menu_item_el,dropdown_menu_elandtoolbar_el. Those builders exposed no typography, hover/focus, shadow or overflow styling. Logseq styles these elements throught -> tdecorators, so after this change it could not compile without dropping that styling or getting around the slot types.This PR adds one typed style value,
Slot_style.t. It is accepted as a single optional~styleargument by the ordinarymenu_item,dropdown_menu_item, the dropdown containers and toolbar controls/text. The restricted slot types are unchanged. The style maps onto wire properties these elements already support, so the wire protocol does not change.docs/api-migrations.mdlists which renderers draw each property. Apple native menu labels ignore typography, and Android menu rows ignore hover/focus.Testing
data-highlightedcoverage, exact muted-background assertions, and native core.scroll_keyexit. All three fail the same way on base8b8c0f42.Link to Devin session: https://app.devin.ai/sessions/5f265455dad249ecbf49d40db7f7a88a
Open in Devin Desktop: https://app.devin.ai/desktop/session/5f265455dad249ecbf49d40db7f7a88a?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed all 2 findings · Follow Devin's work