Skip to content

Inconsistent file chooser behavior across platforms, especially with multi-part extensions #54

@petebankhead

Description

@petebankhead

Relates to #53 which tries only to make things 'less bad'.

The behavior of a (save) file chooser in JavaFX differs according to platform, e.g.

I think the solution might be to do a thorough investigation and try to come up with something workable across platforms.

My guess is that:

  • We should provide a default name if none is specified
    • If we can get the extension from a filter, we should leave that up to the filter
      • Except for multi-part extensions on macOS, where we need to add the first part only (e.g. Untitled.ome if we want Untitled.ome.tif)
  • If a name is specified, we should strip the extension from the name and leave it up to the filter
    • Except we can't do that if the filter supports multiple extensions (e.g. .tif, .tiff) and we want to default to an existing file... since this might then choose the wrong option
      • We also can't do that on macOS for multi-part extensions; we'd probably need to add the first part again (e.g. Titled.ome)

In any case, it seems likely to be a painful task to come up with sensible behavior for all scenarios... so this issue exists as a reminder, and also to avoid creating lots of 'small' issues to fix inconsistent behavior with the current code that might cause us to break things on other platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions