Add "item size" to toggle between rows / cards for the Packages pane#13156
Open
bricestacey wants to merge 5 commits intomainfrom
Open
Add "item size" to toggle between rows / cards for the Packages pane#13156bricestacey wants to merge 5 commits intomainfrom
bricestacey wants to merge 5 commits intomainfrom
Conversation
|
E2E Tests 🚀 |
8189712 to
7b6f0ca
Compare
Introduces a 'card' item size mode alongside the existing compact row layout. Cards show the package name and version on the first line, a description on the second, and the author on the third, with long values truncated to a single line. The mode is toggled from the view title (Show as Cards / Show as Rows) or via the 'Toggle Packages List Layout' command and persisted per-user. Python and R RPCs now return description and author fields populated from distribution metadata and DESCRIPTION, respectively. See #12925
- Expose `author?` on the public LanguageRuntimePackage API so extensions can populate what the cards render. - Python: fall back through Author, Author-email, Maintainer, and Maintainer-email, stripping trailing `<email>` so packages that only set a maintainer (e.g. click -> "Pallets") still show one. - Persist the card/row preference in profile storage instead of application-wide storage. - Search filter now matches description and author in addition to name. - Tighten the card's left padding. See #12925
Drop the IStorageService integration so the item size resets to 'row' on each window. We can revisit persistence (profile vs. workspace, or with additional state) in a follow-up. See #12925
Drop the `_itemSize` field on PositronPackagesService; read through `_itemSizeContextKey.get()` instead. The RawContextKey's default supplies the initial 'row' value. See #12925
PackageMetadata (the protocol typing importlib.metadata.Distribution.metadata in 3.14) doesn't expose .get(), so pyright rejects the calls that parse Summary/Author/Maintainer. The runtime object (email.message.Message) still has .get(); bind it through an Any local so the calls pass type-checking. See #12925
7b6f0ca to
41ecc76
Compare
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.
See #12925
Adds "Item Size" action button to the Packages pane.
This PR adds ark support to supplement R packages posit-dev/ark#1165
Release Notes
New Features
Bug Fixes
QA Notes
Until the ark PR lands, you'll want to build that.
Otherwise, you can test for python.
When you expand to card view, everything should kinda just stay the same but turn into cards.
@:packages-pane