kartik-v / yii2-tree-manager

An advanced tree management module using nested sets for Yii 2.
http://demos.krajee.com/tree-manager
Other
150 stars 107 forks source link

Checkbox Overwrites Name In Admin Settings #256

Closed BillHeaton closed 4 years ago

BillHeaton commented 4 years ago

Prerequisites

Steps to reproduce the issue

  1. Probably reproducible on demo site with a one line addition
  2. Add 'displayValue' => 2, to Widget declaration
  3. Bring the form up.
  4. Notice Corruption.
  5. Select another node
  6. Notice it displays correctly

Expected behavior and actual behavior

When I follow those steps, I see... Yii2_AdminOverwrite

I was expecting... Normal display as in Step 6.

Environment

Browsers

Operating System

Libraries

Isolating the problem

kartik-v commented 4 years ago

I am not able to reproduce this issue. It seems more a CSS/styling issue. Seems you are using some Checkbox styling plugin in your code (based on the screenshot you shared). You may need to check how you are initializing that.

BillHeaton commented 4 years ago

I agree. It only happens on the first paint of the detail screen. It's like something isn't being set on the first pass. I'll redo it on the "Plain Jane" environment again.

On Oct 8, 2019, at 8:12 AM, Kartik Visweswaran notifications@github.com wrote:

I am not able to reproduce this issue. It seems more a CSS/styling issue. Seems you are using some Checkbox styling plugin in your code (based on the screenshot you shared). You may need to check how you are initializing that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kartik-v/yii2-tree-manager/issues/256?email_source=notifications&email_token=AAUVA2NFTADSNAAINUODEUTQNSPNFA5CNFSM4I6NCCKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAUQW6A#issuecomment-539560824, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUVA2PJVVDPOVFQMCUD5I3QNSPNFANCNFSM4I6NCCKA.

BillHeaton commented 4 years ago

Created a new project "testbed." It has only following requires and their dependencies:

Followed Steps 1-4 and using:

If I move to any other node is the management portion displays correctly. same behavior on Firefox and Chrome except the two columns stack L-R correctly. Only safari moves the detail below treeview.

Testbed_256

kartik-v commented 4 years ago

You need to ensure you do not wrongly have both bootstrap 3 and bootstrap 4 assets loading on your page. Can typically happen if you are using default widgets.

BillHeaton commented 4 years ago

That opened a big can of worms. Restarting the testbed. Do you know any good howto's on the process switching from bootstrap3 to bootstrap4? If not, I think I'll write one.

Will use yii2-bootstrap4/docs/guide/README.md as a starting point

kartik-v commented 4 years ago

If you use all of Krajee widgets - they allow you to selectively load Bootstrap 3 or Bootstrap 4 by setting bsVersion. So if you have globally set this to 4.x all Krajee widgets will load BS4 assets only. But if you use other widgets be careful of their dependency (like yii2-bootstrap loads BS3). Also Yii2 app basic or advanced templates by default loads yii2 bootstrap assets in the view layouts which loads BS3 libraries. You need to override all view layouts or create your own custom BS4 view layout. I would recommend configuring yii2 asset manager component in your yii2 config to ensure BS4 Js/Css only for your use case and ensure any BS3 libraries do not load any assets.

BillHeaton commented 4 years ago

Ack. That was the can of worms I was talking about. I'll report progress as I do the HowTo. I want to start with nothing and make it all the way to being Bootstrap4 ready using the basic application.

On Oct 8, 2019, at 11:33 PM, Kartik Visweswaran notifications@github.com wrote:

If you use all of Krajee widgets - they allow you to selectively load Bootstrap 3 or Bootstrap 4 by setting bsVersion. So if you have globally set this to 4.x all Krajee widgets will load BS4 assets only. But if you use other widgets be careful of their dependency (like yii2-bootstrap loads BS3). Also Yii2 app basic or advanced by default loads yii2 bootstrap assets which loads BS3 libraries.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kartik-v/yii2-tree-manager/issues/256?email_source=notifications&email_token=AAUVA2IGLYCBJEQIFD4YJVTQNV3KXA5CNFSM4I6NCCKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAWZGPI#issuecomment-539857725, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUVA2O5DAYXOYDLRA7S4JTQNV3KXANCNFSM4I6NCCKA.

BillHeaton commented 4 years ago

Have the bullet points done. One cosmetic change needed. Need to flesh out the article. Relatively painless to do but not for novices.

It' one in the morning, so going to bed. Will write it up and post tomorrow.

kartik-v commented 4 years ago

Refer enhancement #258 which includes enhanced styled custom BS4 checkboxes and radios by default. Cross check updated demo as well to see how this renders by default on a pure BS4 environment. Currently closing this issue. But please feel free to record your findings here for others to note. Thanks.

BillHeaton commented 4 years ago

Howto now online at http://www.winkwinknodnod.net/yii2-bs4/

You have permission to freely copy under the same license at Kartik.

Will restart the testbed to make it a pure bootstrap4 environment

BillHeaton commented 4 years ago

@kartik-v Doing the pure bootstrap4 from http://www.winkwinknodnod.net/yii2-bs4/ only had one weirdness.

yii2-krajee-base/initBsAssets() was selecting bootstrap instead of bootstrap4 which of course didn't exist because it had been uninstalled.

The fix was to add bsVersion = '4.x' in config/params.php to set it globally instead of in the module or the widget. Which makes sense to me because we only have bootstrap4 in the water.

This one can remain closed. Feel free to put the howto up where every it makes sense. There are some other issues but still need to research and they can go into their own pile