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

Removed properties, classes and no backward compatible with material 2 version for flutter web #1628

Closed
MacDeveloper1 opened this issue Dec 20, 2023 · 45 comments · May be fixed by #1633
Closed
Labels
bug Something isn't working

Comments

@MacDeveloper1
Copy link
Contributor

MacDeveloper1 commented Dec 20, 2023

@ellet0 @singerdmx today I again update the package to version 9.0.5 and I get errors again!!!
Why do you remove properties from QuillToolbarSelectHeaderStyleDropdownButtonOptions? I suggested my widget QuillToolbarSelectHeaderStyleDropdownButton as is. Why QuillToolbarSelectAlignmentButton does not contains properties
showLeftAlignment, showCenterAlignment, showRightAlignment, showJustifyAlignment if the are alway the until 8.6.4

Please revert to the latest working version 8.6.4 or stop the always breaking. Please support backward compability because of your actions people could not compile their working projects.

Yesterday I spent more time to force my web app working and those modifications were merged but now may modifications are already absent.

Please restore my code QuillToolbarSelectHeaderStyleDropdownButton because it did not use MenuAnchor and its GUI must be similar to QuillToolbarFontFamilyButton and QuillToolbarFontSizeButton.

image

image

@MacDeveloper1 MacDeveloper1 added the bug Something isn't working label Dec 20, 2023
@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

Let's consider the original code:

  Widget _buildContent(BuildContext context) {
    final theme = Theme.of(context);
    final hasFinalWidth = options.width != null;
    return Padding(
      padding: options.padding ?? const EdgeInsets.fromLTRB(10, 0, 0, 0),
      child: Row(
        mainAxisSize: !hasFinalWidth ? MainAxisSize.min : MainAxisSize.max,
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          UtilityWidgets.maybeWidget(
            enabled: hasFinalWidth,
            wrapper: (child) => Expanded(child: child),
            child: Text(
              _valueToText[_selectedAttribute]!,
              overflow: options.labelOverflow,
              style: options.style ??
                  TextStyle(
                    fontSize: iconSize / 1.15,
                    color:
                        iconTheme?.iconUnselectedColor ?? theme.iconTheme.color,
                  ),
            ),
          ),
          const SizedBox(width: 3),
          Icon(
            Icons.arrow_drop_down,
            size: iconSize / 1.15,
            color: iconTheme?.iconUnselectedColor ?? theme.iconTheme.color,
          )
        ],
      ),
    );
  }

The new code:

        builder: (context) {
          final isMaterial3 = Theme.of(context).useMaterial3;
          final child = Row(
            mainAxisSize: MainAxisSize.min,
            children: [
              Text(
                _label(_selectedItem),
                style: widget.options.textStyle ??
                    TextStyle(
                      fontSize: iconSize / 1.15,
                    ),
              ),
              Icon(
                Icons.arrow_drop_down,
                size: iconSize * iconButtonFactor,
              ),
            ],
          );
          if (!isMaterial3) {
            return RawMaterialButton(
              onPressed: _onDropdownButtonPressed,
              child: child,
            );
          }
          return IconButton(
            onPressed: _onDropdownButtonPressed,
            icon: child,
          );
        },
      ),
    );

You just simply remove padding for the whole Row?! You removed mainAxisAlignment and mainAxisSize even didn't understanding for what it is and that is can be used somewhere?! You removed the _showMenu which is similar to font family selection and where the selected item was highlighted by another color?!

Why? Why did you remove anything if you did not know how it is working.

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

I'm not removing anything this time, it just conflicts between many buttons made by PRs

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Replace with QuillToolbarSelectAlignmentButtons
it has all the old properties you needs

@ellet0 ellet0 changed the title WHY DO YOU BREAK THE PACKAGE??!! Conflicts with QuillToolbarSelectAlignmentButtons (WHY DO YOU ALWAYS DO BREAKING CHANGE) Dec 20, 2023
@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Please restore my code QuillToolbarSelectHeaderStyleDropdownButton because it did not use MenuAnchor and its GUI must be similar to QuillToolbarFontFamilyButton and QuillToolbarFontSizeButton.

I already told you, there was been conflicts and I need you to re add the options but you didn't respond so I had to remove them, I can restore them but I need you to use them in the widget

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

To make it clear, you did upgrade from your local branch to 9.0.5?? it's not really related to 9.0.5
you can take a look at the the releases using tag

we did not remove them in 9.0.5

@MacDeveloper1
Copy link
Contributor Author

Well.

This is a code from 8.6.4 in fil lib/src/widgets/toolbar/buttons/quill_icon_button.dart

  @override
  Widget build(BuildContext context) {
    return ConstrainedBox(
      constraints: BoxConstraints.tightFor(width: size, height: size),
      child: UtilityWidgets.maybeTooltip(
        message: tooltip,
        child: RawMaterialButton(
          visualDensity: VisualDensity.compact,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(borderRadius),
          ),
          fillColor: fillColor,
          elevation: 0,
          hoverElevation: hoverElevation,
          highlightElevation: hoverElevation,
          onPressed: () {
            onPressed?.call();
            afterPressed?.call();
          },
          child: icon,
        ),
      ),
    );
  }

As you may see it contains fillColor depending of isToggle, i.e. icon is colored when some style is selected.

Now let's see on latest code:

  Widget build(BuildContext context) {
    if (isFilled) {
      return IconButton.filled(
        padding: padding,
        onPressed: onPressed,
        icon: icon,
        style: iconStyle,
      );
    }
    return IconButton(
      padding: padding,
      onPressed: () {
        onPressed?.call();
        afterPressed?.call();
      },
      icon: icon,
      style: iconFilledStyle,
    );
  }

Do you understand that this is not equivalent modification? You removed constraints, you removed tooltip, you removed rounded rectangle, you removed afterPressed call. You break the visual representation completely.

How do you suggest me to restore rounded rectangle hovering, how do you suggest me to have the buttons size? Use the addiional ThemeData, wrap each icon in ConstarainedBox? Why do I need to do this if all was working fine before?

@MacDeveloper1
Copy link
Contributor Author

To make it clear, you did upgrade from your local branch to 9.0.5??
No. I upgraded from pub.dev:

dependency:
flutter_quill: ^9.0.5

@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

Replace with QuillToolbarSelectAlignmentButtons

Are you sure? I see the parameter options which I used to pass my own tooltips and where in the code of this class is it handled? So again breaking change without backward compability. This class is no go.

@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

Just for experiment I added those class and what I see?

image

Where is correct vertical alignment for all buttons? Also I see different icon looks. Look at aligment sharp icons and remain ones which looks bigger. Again breaking change without backward compability.

@singerdmx versions from 8.6.4 is buggy and not backward compatible.

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Just for experiment I added those class and what I see?

image

Where is correct vertical alignment for all buttons? Also I see different icon looks. Look at aligment sharp icons and remain ones which looks bigger. Again breaking change without backward compability.

@singerdmx versions from 8.6.4 is buggy and not backward compatible.

I don't know about your code sample, I test things in the example and it looks fine
Please send it so I can test it

@MacDeveloper1
Copy link
Contributor Author

image

image

Why font family has rectangle highlighting (where rounding as before) and bold button has circle hightling (as it was rounding rectangle)?

@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

I don't know about your code sample, I test things in the example and it looks fine
What are you talking about. Until version 8.6.4 I updated version and I never had problems with GUI, it was not changed. The problems occurred on each new version

Please send it so I can test it

Are you kidding? How can I send you a whole project? Just create and example for yourself (on all platforms!). It is simple - just quill controlls separated by divider.

P.S. The simple solution is to revert to 8.6.4 or at least 9.0.0-dev where you make QuillProvider optional and try to implement new modification carefull with testing at least on 4 platforms: adnroid, ios, web, windows.

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

I don't know about your code sample, I test things in the example and it looks fine
What are you talking about. Until version 8.6.4 I updated version and I never had problems with GUI, it was not changed. The problems occurred on each new version

Please send it so I can test it

Are you kidding? How can I send you a whole project? Just create and example for yourself (on all platforms!). It is simple - just quill controlls separated by divider.

P.S. The simple solution is to revert to 8.6.4 or at least 9.0.0-dev where you make QuillProvider optional and try to implement new modification carefull with testing at least on 4 platforms: adnroid, ios, web, windows.

I meant the code sample

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

I don't know about your code sample, I test things in the example and it looks fine
What are you talking about. Until version 8.6.4 I updated version and I never had problems with GUI, it was not changed. The problems occurred on each new version

Please send it so I can test it

Are you kidding? How can I send you a whole project? Just create and example for yourself (on all platforms!). It is simple - just quill controlls separated by divider.

P.S. The simple solution is to revert to 8.6.4 or at least 9.0.0-dev where you make QuillProvider optional and try to implement new modification carefull with testing at least on 4 platforms: adnroid, ios, web, windows.

Reverting as not an option, give me second chance, I will fix the font size issue with the dropdown buttons then the styling using material 3 but I will need you to test thing on the pre release channel

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Why font family has rectangle highlighting (where rounding as before) and bold button has circle hightling (as it was rounding rectangle)?

It's new material 3 behavior

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Just for experiment I added those class and what I see?

image

Where is correct vertical alignment for all buttons? Also I see different icon looks. Look at aligment sharp icons and remain ones which looks bigger. Again breaking change without backward compability.

@singerdmx versions from 8.6.4 is buggy and not backward compatible.

image

Now it's fixed, the justify min width is back

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Now I'm fixing the toolbar when multiRowsDisplay is false

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

You removed the _showMenu which is similar to font family selection and where the selected item was highlighted by another color?!

Again, I used the material 3 dropdown instead of the current one

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Well.

This is a code from 8.6.4 in fil lib/src/widgets/toolbar/buttons/quill_icon_button.dart

  @override
  Widget build(BuildContext context) {
    return ConstrainedBox(
      constraints: BoxConstraints.tightFor(width: size, height: size),
      child: UtilityWidgets.maybeTooltip(
        message: tooltip,
        child: RawMaterialButton(
          visualDensity: VisualDensity.compact,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(borderRadius),
          ),
          fillColor: fillColor,
          elevation: 0,
          hoverElevation: hoverElevation,
          highlightElevation: hoverElevation,
          onPressed: () {
            onPressed?.call();
            afterPressed?.call();
          },
          child: icon,
        ),
      ),
    );
  }

As you may see it contains fillColor depending of isToggle, i.e. icon is colored when some style is selected.

Now let's see on latest code:

  Widget build(BuildContext context) {
    if (isFilled) {
      return IconButton.filled(
        padding: padding,
        onPressed: onPressed,
        icon: icon,
        style: iconStyle,
      );
    }
    return IconButton(
      padding: padding,
      onPressed: () {
        onPressed?.call();
        afterPressed?.call();
      },
      icon: icon,
      style: iconFilledStyle,
    );
  }

Do you understand that this is not equivalent modification? You removed constraints, you removed tooltip, you removed rounded rectangle, you removed afterPressed call. You break the visual representation completely.

How do you suggest me to restore rounded rectangle hovering, how do you suggest me to have the buttons size? Use the addiional ThemeData, wrap each icon in ConstarainedBox? Why do I need to do this if all was working fine before?

This issue has been fixed in the latest pre-release

@MacDeveloper1
Copy link
Contributor Author

Again, I used the material 3 dropdown instead of the current one.

What do you mean material dropdown? Is it different than one which is avaiable for years?
My QuillToolbarSelectHeaderStyleDropdownButton was created similar to font family and font size dropdowns. So why than you modified only one class but leave 2 others?

@MacDeveloper1
Copy link
Contributor Author

This issue has been fixed in the latest pre-release

I don't know which pre-release are you talking about. Now I have the problem - my GUI is away different after changes.
How can I restore my GUI exactly?

For example, how can I make rounded rectangle highlighting over all toggle buttons? Using Theme with overriden property will not bring any effect. Suggestion?

@MacDeveloper1 MacDeveloper1 changed the title Conflicts with QuillToolbarSelectAlignmentButtons (WHY DO YOU ALWAYS DO BREAKING CHANGE) Buggy and not backward compatible version for web (WHY DO YOU ALWAYS DO BREAKING CHANGE) Dec 20, 2023
@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Again, I used the material 3 dropdown instead of the current one.

What do you mean material dropdown? Is it different than one which is avaiable for years? My QuillToolbarSelectHeaderStyleDropdownButton was created similar to font family and font size dropdowns. So why than you modified only one class but leave 2 others?

I will change the others soon in the pre release

QuillToolbarSelectHeaderStyleDropdownButton

Let's make it clear, @singerdmx and I agreed that it should be dropdown button for the select header style as a default, I create it from scratch but I forgot that it didn't match with the font family and font size

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

This issue has been fixed in the latest pre-release

I don't know which pre-release are you talking about. Now I have the problem - my GUI is away different after changes. How can I restore my GUI exactly?

For example, how can I make rounded rectangle highlighting over all toggle buttons? Using Theme with overriden property will not bring any effect. Suggestion?

Please use IconButton.styleFrom() to style things, it exists in the QuillIconTheme

image

@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

Why do you think that I use QuillToolbar.simple? I use QuillToolbar and show only those buttons which I need. So I cannot specify any options you suggested.

Why size of icons and dropdowns in your example image is different? Why normal is away different?

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Why do you think that I use QuillToolbar.simple? I use QuillToolbar and show only those buttons which I need.

You still have buttonOptions

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Why do you think that I use QuillToolbar.simple? I use QuillToolbar and show only those buttons which I need. So I cannot specify any options you suggested.

You can customize them and decide which button you want with which size,
You can still pass quill icon theme to the options of any button you want to use.

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Why size of icons and dropdowns in your example image is different? Why normal is away different?

That's because when I migrated to material 3, both the buttons and dropdown buttons, it was not constant for some reasons, I copied the workaround from the old code and it worked (divide the iconSize by 1.15, but then we had a PR which add iconButtonFactor), now it looks exactly the same to me right now

image

What do you mean by the size is different?

@MacDeveloper1
Copy link
Contributor Author

MacDeveloper1 commented Dec 20, 2023

So many time I lost to just say you create a realy buggy version. Yesteryda I fixed issues and your merged a PR then you roll it back. Why do you publish such raw version basically? I trusted the package until 8.6.4. Now I have problem with my web app. It looks ugly.

I want this
image
Not this
image

How can I fix this?

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

So many time I lost to just say you create a realy buggy version. Yesteryda I fixed issues and your merged a PR then you roll it back. Why do you publish such raw version basically? I trusted the package until 8.6.4. Now I have problem with my web app. It looks ugly.

I want this image Not this image

How can I fix this?

Because it brings other issues, like the icon sizes and icon button factor, I told you to try to fix it but you dissapeared

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Not this

Please send me your code sample for the toolbar, for this part only

why it work on the example but not on yours sample code? if you want to report a bug and want others to be able to see it you either provide the code sample or at least test it in the example

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

I just tested the custom toolbar example and it work perfectly fine

image

no hovering issues or anything, please use the latest pre-release

@MacDeveloper1
Copy link
Contributor Author

Also I've just enable useMaterial3 and what I see...
image

Blue color must be on icon but not on background. Font size is looks weird.

@MacDeveloper1
Copy link
Contributor Author

I hope this image from flutter web environment?

I just tested the custom toolbar example and it work perfectly fine

image

no hovering issues or anything, please use the latest pre-release

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

What do you mean by the size is different?

Look at dropdowns and toggle buttons.

image

Where is the problem?

Also I've just enable useMaterial3 and what I see... image

Blue color must be on icon but not on background. Font size is looks weird.

Again can you send me the code sample?

@MacDeveloper1
Copy link
Contributor Author

Where is the problem?

Don't you see the different height of buttons and dropdowns?

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

image
image

It's not specific to web

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Where is the problem?

Don't you see the different height of buttons and dropdowns?

That's another issue, let's fix your current one

All what I did I used the icon button and dropdown from material 3 and that's all, I didn't change anything else like the height

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Without the code sample unfortunately I can't help you

@MacDeveloper1
Copy link
Contributor Author

All what I did I used the icon button and dropdown from material 3 and that's all, I didn't change anything else like the height
No. You changed code of some classes completely. I am tied to point you.
You changed QuillToolbarToggleStyleButton, QuillToolbarIconButton which affects all toogle buttons. You change header dropdown and select alignment.

If you say you used the icon button and dropdown from material 3 so your code should be looks like:

Widget build(...) {
  if (useMaterial3) {
    return YourNewFunctionality();
  } else {
    return OldTestedAndWorkingFunctionality(); // But you actually changed the functionality of this
  }
}

@MacDeveloper1
Copy link
Contributor Author

Without the code sample unfortunately I can't help you

You don't need the example.

How can implement the round rectangle highlightin on mouse hover using current version?

image

@MacDeveloper1
Copy link
Contributor Author

I told you to try to fix it but you dissapeared

Sorry man but I am not a freelancer and developer, and I am not a supporter of this package. I can just suggest the features and fix bugs if I have time and I have some functionality which is absent in a Quill.

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Without the code sample unfortunately I can't help you

You don't need the example.

How can implement the round rectangle highlightin on mouse hover using current version?

image

Use the childBuilder in the base button options and add the old code there to use the old code for all buttons
Just send me your code sample and I will do it

@ellet0
Copy link
Collaborator

ellet0 commented Dec 20, 2023

Let me adjust the code and I will send it to you

@ellet0 ellet0 changed the title Buggy and not backward compatible version for web (WHY DO YOU ALWAYS DO BREAKING CHANGE) Buggy and not backward compatible with material 2 version for web (WHY DO YOU ALWAYS DO BREAKING CHANGE) Dec 20, 2023
@MacDeveloper1 MacDeveloper1 changed the title Buggy and not backward compatible with material 2 version for web (WHY DO YOU ALWAYS DO BREAKING CHANGE) Removed properties, classes and no backward compatible with material 2 version for flutter web Dec 21, 2023
@MacDeveloper1 MacDeveloper1 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Repository owner deleted a comment from MacDeveloper1 May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants