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

Release the beta-31 of Mastodon #335

Merged
merged 229 commits into from
Oct 11, 2024
Merged

Release the beta-31 of Mastodon #335

merged 229 commits into from
Oct 11, 2024

Conversation

tinevez
Copy link
Contributor

@tinevez tinevez commented Oct 11, 2024

No description provided.

tinevez and others added 30 commits August 8, 2023 14:58
This branch reflects an effort to rework the main class of the Mamut
app: the MamutAppModel. The main goal is to make the app model the
core of a Mastodon session, and have all of its fields final, and
have them containing everything we need to run all featuures of the
app.

This is a WIP but so far we have:
- The windowManager is now a field of the app model.
- The app model is immutable: it cannot change under the user feet.
When a user loads a project, it gets another instance, but cannot
modify an existing one.
- And to do this, the main work of this PR is the rework of the project
loading and saving, detailed a bit below.

The ProjectManager class is gone, replaced by 4 classes with only static
methods, in the package org.mastodon.mamut.io. Each one takes care
about loading, saving, importing or exporting.

The loading methods all produces a new MamutAppModel instance. This
instance receives the MamutProject it was created on (handy to save
it later). The app model is properly initiatialized ONCE with
everything. Then a consumer can create a MainWindow to pilot it.

I have updated all the classes so that they compile. The tests all
run (except for the garbage collection from Mathias, which requires
changing two deps). But I am anxious to see if we cover all the use
cases below:

- [x] open a project
- [ ] save a modified project
- [x] 'save as' a project
- [ ] test that we can reload a saved project
- [ ] test that we can reload a 'saved as' project

The importers and exporters work, as seen by the tests, but I would like
to test them and rework their UI.
Then I will rework again the app model, rename it etc...
Also make more explicit their respective role in the javadoc.
We rely on MamutAppModel for non-view related fields.
Also, do not test for appModel == null anymore.
They will generate an error in v2.0.
This commit removes mention of the deprecated SetupAssignments and
BrightnessDialog classes. The actions that brought the corresponding
dialogs are removed as well.
There is some code to still make it possible to save/load bdv settings
and use ones that are generated 'elsewhere'.
Mainly as an effort to reduce the number of fields and methods
in the window manager class. We began with just a manager for BDV
and TrackScheme styles but now we have 5 of them. For now.
Also this will make it easier to extend Mastodon with
new views in the future.
The view lists are stored in a map, indexed by their class, like for
the manager. This diminish the number of fields and methods in the
window manager class.

This also allows for treating views in a general manner without
having to change too much code when a new view will be added.
For this I shall find a way to create view instances in a generic
manner, probably with a factory pattern.
We started with just 2 views (BDV and TrackScheme) but now there are
enough of them is that it is worthwhile having some generic way of
handling them. The next commits will be about coming with a sensible
way of doing it. Ideally, we want to make it possible for 3rd parties
to extends Mastodon with new views without having to recompile it.
- Get rid of IMastodonView and IMastodonFrameView
- An interface for views that have a ViewerFrame,
that MastodonFrameView implements.
- An interface for all Mamut views (branch and core graphs) that
extend from it, and add methods for GroupHandle on onClose().
- MamutView and MamutBranchView both implement this interface.
So that now we can have one factory type for both branch and core
graph views.
Tune the bdv factory accordingly.
tinevez and others added 29 commits October 10, 2024 12:47
Also add the 'Mastodon' keyconfig context.
So that we can manage registering several actions, and registering
the action to show the command finder to a separate one.
Otherwise the command finder won't be aware of the commands that
are added after it is installed.
Also add the meta shift F to the default bindings.
…and finder.

Important because the descriptions are what we start from to build the
list of commands in the finder.
I should not commit when I am sleep deprived.
So that we can reuse it for the BVV.
So that we can reuse them for the BVV.
It was never put on ?!?!
@tinevez tinevez merged commit 7da5e11 into master Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants