Add unified Deck Browser for home and deck editor#10636
Conversation
|
well this is huge... can you spin off the |
Yeah it's kept me pretty busy. And sure, will try that and see how it looks. |
|
@Madwand99 currently the "format" of a deck (constructed/commander/oathbreaker) etc is determined by which deck browser panel you have open at the time the deck is created, so you have to be in the commander tab when you create your deck or else it doesn't get a command zone. How does this work in your PR if we're collapsing those different browser panels into a general purpose one? i.e. how do you assign your deck to commander format here? (FWIW I think the current "open format tab first, then create deck" approach is highly unintuitive hence #10517 - so I've got nothing against a unified approach, just want to make sure we don't lose functionality along the way). |
@MostCromulent In the editor, the new Deck Browser is not just a passive file list. Navigating into a real format folder updates the Current Deck section’s active deck type. So entering the commander folder switches the editor to Commander handling, and new/saved decks from there get the command zone as expected. The browser is general-purpose UI, but the selected real folder still provides the format context. |
not sure this binding of folder name = variant type is flexible enough or wouldn't lead to some undesired results... 🤔 |
@tool4ever Anything else needed? |
@tool4ever Good point. I checked this and tightened it up. The mapping is not intended to be arbitrary “folder name equals variant”; it is based on known deck root paths such as the configured commander/oathbreaker/brawl/tiny leaders directories. Subfolders now inherit that explicit root context, including when opened from recursive/search results. Unknown custom folders still default to constructed rather than becoming variants by name. |
imo this is why ideally Forge shouldn't be enforcing a norm of save location = variant at all. variant type should just be assigned by user on a per deck basis with a format dropdown or checkbox in the editor (not this PRs fault, it's just working with the current backend architecture) |
This branch adds a shared Deck Browser experience for the desktop Home tab and Deck Editor.
Major changes:
Validation:
mvn -pl forge-gui-desktop -am -DskipTests compile passes.