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

[Component] Breadcrumb current path lost on changing Radiance skin #376

Closed
kirill-grouchnikov opened this issue Jan 1, 2022 · 1 comment
Assignees
Labels
6.0 - Iridium Release 6.0 - 2022.H2 Breaking change Marking changes that break backwards compatibility

Comments

@kirill-grouchnikov
Copy link
Owner

No description provided.

@kirill-grouchnikov kirill-grouchnikov added the 6.0 - Iridium Release 6.0 - 2022.H2 label Jan 1, 2022
@kirill-grouchnikov kirill-grouchnikov self-assigned this Jan 1, 2022
@kirill-grouchnikov kirill-grouchnikov added the Breaking change Marking changes that break backwards compatibility label Jan 1, 2022
@kirill-grouchnikov
Copy link
Owner Author

There are two parts of it. The first one is showing the breadcrumb bar content itself. That is "skipped" in here where the UI delegate resets the content of the bar to its root. This is what is causing the "loss" of the content. It's not a problem on the first creation of JBreadcrumbBar as the model is created in the constructor and then the UI delegate is first initialized. This can be addressed by checking the breadcrumb bar model in the method linked above and recreating the content if the model is not empty.

The second part will require revisiting how breadcrumb bar works with content icons, and that is something that is going to be backwards incompatible. Right now, it is working with the core Icon interface, which is not scaling at all in the world of light/dark/mixed skins. That can already be seen today in showing the file system under something like Magellan or Graphite skins. The folder icons (from FileSystemView.getSystemIcon that eventually use the "FileView.directoryIcon" entry in UIManager) do not change their color on rollovers. These Icon implementations are then wrapped in RadianceIcon ones (here and here) but of course there's no support for IconFilterStrategy in there.

There is a rather awkward way to add a new method to BreadcrumbBarContentProvider to recreate the content after skin switch, but it's not the cleanest, and will also not address the core issue of using fixed-appearance icons in a mixed-appearance Radiance world.

So the first thing to do is to address the main content issue. Then, it will be switching BreadcrumbItem to use RadianceIcon, adding APIs to JBreadcrumbBar to control icon filter strategy, and then revisiting the existing FileSystemContentProvider and TreeContentProvider on how they work with icons.

kirill-grouchnikov added a commit that referenced this issue Jan 1, 2022
* Rename BreadcrumbBarModel to BreadcrumbBarContentModel
* Add BreadcrumbBarPresentationModel
* Switch BreadcrumbItem from Icon to RadianceIcon.Factory
* Add IconProvider to BreadcrumbFileSelector
* Add icon filter strategies to command popup menu presentation model

For #375 and #376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0 - Iridium Release 6.0 - 2022.H2 Breaking change Marking changes that break backwards compatibility
Projects
None yet
Development

No branches or pull requests

1 participant