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

fix: resolve caption state handling and CSS issues #278

Merged
merged 5 commits into from
Feb 7, 2025

Conversation

idebenone
Copy link
Member

Problem

  • The caption feature in the Image Tool wasn't properly reflecting the correct state when preloaded data contained a caption.
    pre-load data caption state
  • The tune state for the caption wasn't consistent.
    tune-state-inconsistency
  • CSS styling for visually showing/hiding caption field was altering the inline-toolbar position.
    inline-toolbar-css
  • select an image button was hidden in uploading state causing a bad UX if user doesn't select any file.
    upload-image

Solution

  • Corrected the logic to properly handle the caption state when loading pre-existing data.
    if (data.caption) {
      this.setTune('caption', true);
    }
  • Introduced an utility function which determines the tune state directly reading the CSS rather than depending on this._data values.
  • Instead of depending on display property, relying on visibility fixed the problem.
  • Removed button's styling display: none during uploading state.

@idebenone idebenone requested a review from neSpecc November 30, 2024 06:54
@idebenone idebenone requested a review from neSpecc January 27, 2025 16:57
@idebenone idebenone merged commit 2cddffc into master Feb 7, 2025
1 check passed
@idebenone idebenone deleted the fix/patch-2.10.2 branch February 7, 2025 09:32
@orbachar
Copy link

orbachar commented Mar 3, 2025

Hi thanks for the fix, but now the caption input is hidden by default
image
users of our app got confused

is it a bug or by design?

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.

3 participants