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

INVITATION FOR COLLABORATORS #25

Open
yobryon opened this issue Jul 14, 2020 · 6 comments
Open

INVITATION FOR COLLABORATORS #25

yobryon opened this issue Jul 14, 2020 · 6 comments

Comments

@yobryon
Copy link
Owner

yobryon commented Jul 14, 2020

As active users have no doubt noticed, I have not had the time to devote to this project as I did back at the beginning. Seeing that there is an active community, I would like to protect the community and keep the project alive (or give it new life).

To that end -- if anyone is interested in taking part in this project, please ping me. I am considering moving the repo to an organization, and bringing in folks to take on administering/furthering the project.

Any interest?

@ryders
Copy link

ryders commented May 13, 2022

@yobryon

Consider getting in touch with https://github.com/greatcloak/ngx-barcode who has updated, packaged and npm published an updated version. (It npm installs fine on ng 13)

-- however, @epelc, I'm getting a nativeElement undefined error reproduced here; https://stackblitz.com/edit/angular-ivy-kumuhx

ERROR TypeError: Cannot read properties of undefined (reading 'nativeElement') (see console)

Essentially the this.bcElement (which is defined in the template and @ViewChild() 🤷‍♀️) is undefined when hitting https://github.com/greatcloak/ngx-barcode/blob/cfa71d0bc80cb0d1836e5ccaa3fa1952f3e7fa56/projects/greatcloak/ngx-barcode/src/lib/ngx-barcode.component.ts#L135 (this suggests @yobryon has already fixed -- might just need to pull?

Unfortunately my angular packaging knowledge is pretty limited, so I can't really contribute much more than pulling you two together.. 😬

@ryders
Copy link

ryders commented May 13, 2022

@yobryon -- further to this, I'm not sure if you're looking for help with these.. but one would assume that correct testing requirements would make many of these trivial to merge? https://github.com/yobryon/ngx-barcode/pulls

@epelc
Copy link

epelc commented May 13, 2022

Thanks @ryders I’ll take a look at that bug later today when I’m back at a computer.

I actually have a lot of packaging experience so it wasn’t a big deal to convert over the angular cli. Our repackaged version works on latest angular 13 although I may have not explicitly bumped to the latest angular in a while.

It is in fact packaged using v13 angular cli and was updated with es2020 output for efficiency when we updated to angular v13. Keeping it inline with the rest of the latest options we use for our other libraries.

I’m open to a link to our repo. We do not intend to make any major changes besides upkeep. It’s used in our warehouses to barcode several thousand wood slabs. I tend to bump the angular versions shortly after major angular releases as we like to stay up to date.

epelc added a commit to greatcloak/ngx-barcode that referenced this issue May 13, 2022
	- fix view child undefined in ngOnChanges if there is an initial value since @ViewChild is not set until before ngAfterViewInit
	- see yobryon#20 and yobryon#25 (comment)
@epelc
Copy link

epelc commented May 13, 2022

@ryders see greatcloak@06f9222

Version 2.0.4 fixes the bcElement issue. I believe I didn't run into it in our own usage due to when we set values on the component. ie this !this.value check was preventing it from even running if you didn't pass in a value early https://github.com/greatcloak/ngx-barcode/blob/06f9222ceffc9709ad0c2ded7c47e8daa84e078f/projects/greatcloak/ngx-barcode/src/lib/ngx-barcode.component.ts#L121-L123 thus sidestepping the normal lifecycle of ngOnChanges running before ngAfterViewInit. Should be all fixed now for early setting of a value though.

@ryders
Copy link

ryders commented May 13, 2022

@epelc Well done mate 👍 I share the same approach to trying to stay up to date..

Looking at the nativeElement error, this is definitely reproduced cleanly here: https://stackblitz.com/edit/angular-ivy-kumuhx, I cannot confirm that the bug is actually fixed by the static:true however it's been confirmed that the default value has changed from angular 9 -- https://angular.io/guide/static-query-migration

BOOM 💥

as I'm writing this 2.0.4 was released and confirmed as working: https://stackblitz.com/edit/angular-ivy-kumuhx?file=package.json

@epelc you should know that your handle reads as EPIC 😜 Where do I send the beers to? 🤣

@yobryon this thread confirms Ed is worth working with! 👍

@epelc
Copy link

epelc commented May 13, 2022

@ryders Thanks ryders!

It should be fixed by static: true I've done quite a bit of work with view child/children on autocomplete dialogs and have dealt with this in the past. You can check the docs show it changes when the child becomes available.

True to resolve query results before change detection runs, false to resolve after change detection. Defaults to false.

AKA it will be available before ngOnChanges.

@ryders no beers for me. But maybe could check out some of our products instead.

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

No branches or pull requests

3 participants