haxeui-core icon indicating copy to clipboard operation
haxeui-core copied to clipboard

ListItermRenderer background hide ListView border

Open hypergeome opened this issue 3 years ago • 48 comments

I have a listview with several rows of data. The data rows hide listview border

Expected Behavior

The data rows does not hide listview border

Current Behavior

The data rows hide listview border

Possible Solution

Currently, I have to make itemrender width=99% and horizontalAlign="center" so that it wont hide the list border

Steps to Reproduce (for bugs)

Media

Test app / minimal test case

DemoListBug.zip

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

hypergeome avatar Jun 24 '21 04:06 hypergeome

What backend are you using?

EDIT: i can see its openfl by the project - thanks

ianharrigan avatar Jun 24 '21 04:06 ianharrigan

So, i actually had code to fix this sitting on a branch relating to something else - focus borders - i noticed the same thing there when i set different border sizes it "cut off" the content of the listview because the listview layout (well, scrollview really) was not taking border sizes into account when it calculated its usable size. Ive extracted just that part from that branch, so this should be fixed now.

Let me know if that fixes it, and this issue can be closed.

Cheers, Ian

image

ianharrigan avatar Jun 24 '21 06:06 ianharrigan

It is openfl On Thursday, June 24, 2021, 11:45:31 AM GMT+7, Ian Harrigan @.***> wrote:

What backend are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hypergeome avatar Jun 24 '21 06:06 hypergeome

Thank you

hypergeome avatar Jun 24 '21 06:06 hypergeome

So, I am using haxelib version of haxeui 1.2.3. I use your files for fix 395 including: haxe/ui/layouts/Layout.hx + ScrollView.hx and haxe/ui/styles/Style.hx + ValueTools.hx, the issue is still there.

I tried to use git version. But the component macros inform error on my xml files and failed to compile.

hypergeome avatar Jun 24 '21 07:06 hypergeome

I tried to use git version. But the component macros inform error on my xml files and failed to compile.

What errors? Are you using git versions of haxeui-core and haxeui-openfl?

ianharrigan avatar Jun 24 '21 07:06 ianharrigan

Yes, so, I tried to use git version of both haxeui-core and haxeui-openfl. My project failed to compile because of component macros. It said something about issue with Constraint on findComponent method. below is the error

C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:213: characters 29-42 : Constraint check failure for findComponent.T C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:213: characters 29-42 : { text : haxe.ui.util.Variant } should be haxe.ui.core.Component src/dialogs/ConfirmPopup.hx:9: lines 9-34 : Defined in this class. .... .... ... ... C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:196: characters 25-38 : Constraint check failure for findComponent.T C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:196: characters 25-38 : { visible : Unknown<0> } should be haxe.ui.core.Component src/dialogs/InputPopup.hx:10: lines 10-51 : Defined in this class .... C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:196: characters 25-38 : Constraint check failure for findComponent.T C:/HaxeToolkit/haxe/lib/haxeui-core/git/haxe/ui/macros/Macros.hx:196: characters 25-38 : { text : Unknown<0> } should be haxe.ui.core.Component src/dialogs/InfoPopup.hx:9: lines 9-25 : Defined in this class

Below is my content of confirmPopup.xml for ex


If I use current haxelib version of both (1.2.3), it compiles, but this issue is still there.

hypergeome avatar Jun 24 '21 07:06 hypergeome

can you paste "InfoPopup.hx" ?

and "InputPopup.hx"

ianharrigan avatar Jun 24 '21 07:06 ianharrigan

I am attaching related hx file and xml file assets.zip dialogs.zip

hypergeome avatar Jun 24 '21 07:06 hypergeome

Thanks, thats helpful... do you think you could also include / paste how you are calling these dialogs please?

ianharrigan avatar Jun 24 '21 07:06 ianharrigan

They are all the ssame and simple. Below is an ex @:bind(btnEnterCode, haxe.ui.events.MouseEvent.CLICK) function onEnterCodeClick(e){ var dlg:InputPopup = new InputPopup(); dlg.promptText = "Enter your peer contact's one-time code:"; dlg.okButtonText = "NEXT"; dlg.onOK = function(codeHex:String){ onHaveCode(codeHex); } Main.appContainer.popup(dlg, false, false); }

Main.appContainer.popup simply push dialog into a VBox component to be displayed.

hypergeome avatar Jun 24 '21 07:06 hypergeome

Hmmm, all very strange... code looks totally fine, and everything compiles find this end... Ill try and setup exactly how your are doing things, but it looks totally reasonable to me.

ianharrigan avatar Jun 24 '21 07:06 ianharrigan

I am also trying to create one example to see if the error is informed

hypergeome avatar Jun 24 '21 07:06 hypergeome

That would help alot - minimal examples are defo helpful... feels like a bug to me in core

ianharrigan avatar Jun 24 '21 07:06 ianharrigan

DemoListBug.zip Ok, attached is the demo. Th esame one I sent you before for issue 395. But I simply add InfoDialog into it and it fail to be compiled.

hypergeome avatar Jun 24 '21 07:06 hypergeome

Update, please hcek previous message for demo. Here is my environement setup in case you want C:\Windows\system32>haxelib list actuate: [1.8.9] air4haxe: [1.0.0] box2d: [1.2.3] haxeui-core: 1.2.3 [git] haxeui-openfl: 1.2.3 [git] hscript: [2.4.0] hxcpp: [4.2.1] layout: [1.2.1] lime-samples: [7.0.0] lime: [7.9.0] msignal: [1.2.5] openfl-samples: [8.7.0] openfl: [9.1.0] thx.core: [0.44.0] thx.promise: [0.7.0]

hypergeome avatar Jun 24 '21 08:06 hypergeome

In any case, you can use the haxelib version of haxeui-core and haxeui-openfl, it will compile fine.

hypergeome avatar Jun 24 '21 08:06 hypergeome

what version of haxe? Compiles find this end (after i add public static var appContainer:Dynamic; to Main just to get it to compile Main.appContainer.closePopup())

ianharrigan avatar Jun 24 '21 08:06 ianharrigan

I use haxe 4.0.5. I could not use later version because of macros issues.

hypergeome avatar Jun 24 '21 08:06 hypergeome

I use haxe 4.0.5. I could not use later version because of macros issues. Btw, you can remove everything in onCloseClick (i.e. Main.appContainer stuffs. It is from my project

hypergeome avatar Jun 24 '21 08:06 hypergeome

I could not use later version because of macros issues.

I use 4.2 and havent had any issues btw

I use haxe 4.0.5.

Cool - lemme downgrade and see if i can reproduce

ianharrigan avatar Jun 24 '21 08:06 ianharrigan

Yes, I upgarde to haxe 4.2.2 and it compiles

hypergeome avatar Jun 24 '21 08:06 hypergeome

Cool - and when i downgrade to 4.0.5 is doesnt... so i can reproduce... :)

Now just to find out whats wrong :)

ianharrigan avatar Jun 24 '21 08:06 ianharrigan

So, after upgrading to haxe4.2.2, my project has another issue with your macro. It is property binding. So, inside a component ContactNavigtionBar, I have child component UserIcon. Inside ContactNavigationBar, I bind a property to userIcon.textDisplay and it fail to compile. Let me try to repdocue it in a demo project.

hypergeome avatar Jun 24 '21 08:06 hypergeome

Here. Another demo that show issue with component macro with haxe4.2.2 DemoListBug1.zip

hypergeome avatar Jun 24 '21 08:06 hypergeome

OK, so i added some fixes for 4.0.5, however, i would be interested about your binding issues also (i did add a fix for binding in latest haxeui-core but it may not be related to you issue so it might be worth trying with latest first)

Cheers, Ian

ianharrigan avatar Jun 24 '21 08:06 ianharrigan

Please check previous message. I attached DemoListBug1 for macro+bidning property issue.

hypergeome avatar Jun 24 '21 08:06 hypergeome

hmmm, so i think this is a typing order issue... it may take a little more time... im actually surprised the issue isnt here in 4.0.5 also...

For now you can (should) be able to go back to 4.0.5 and not have errors with git versions while i think about this issue.

Cheers, Ian

ianharrigan avatar Jun 24 '21 08:06 ianharrigan

With haxe4.0.5 and haxeui git version. It will still have macro issue for property binding. So, currently, i will stick with haxe4.0.5 and haxelib version of haxeui.

And yes. Thank you so much. Just take your time. It is not urgent. I have to go to bed now.

So, to sumup:

  1. With haxe4.2.2 and haxeui git version. My project still not compile because of the macro issue with property binding.
  2. With haxe4.0.5 and haxeui git version: Still the same as 1, but your fixes for haxe4.0.5 and previous macro issues works.
  3. I doubt even if you fix this macro issue and it compiles, the Itemerender hide ListView border issue will still exists. I think you were missing something when extracting the fix from other branch.

Cheers,

Cat

hypergeome avatar Jun 24 '21 08:06 hypergeome

I doubt even if you fix this macro issue and it compiles, the Itemerender hide ListView border issue will still exists. I think you were missing something when extracting the fix from other branch.

I dont think thats accurate, i think there are other parts you are missing when you just paste in that fix, thats why you need to use git to get everything in core and backed.

Anyways, thanks for the examples - ill try and get this fixed asap, i have already fixed it, but im trying to find a better solution.

ianharrigan avatar Jun 24 '21 08:06 ianharrigan