Angular wrapper

Hi @davidjerleke ,
Long time no talk! I apologize for the delay, as I've been quite busy lately. I wanted to let you know that I've finished all the Angular wrapper code and documentation. It's all ready for review. The context is here #18 .

[x] embla-carousel-angular
[x] embla-carousel-playground-angular
[x] docs/get-started/angular

There are a few points that need to be clarified:
Bundling

All library wrapper packages have the same rollup.js structure which bundles the code.

Angular has its own webpack-based Angular CLI for bundling, and since the Angular ecosystem is almost exclusively packaged using the Angular CLI, it makes more sense to use it for bundling.
Publishing
As mentioned above, embla-carousel-angular is packaged using the Angular CLI, which outputs the build to the dist folder (or some other non-root path).
All other libraries in the embla-carousel repository are packaged with rollup and exported directly to the root directory of the library, and then the npm publish command is executed in CI/CD, which is not directly usable in embla-carousel-angular.
So I've changed the release command in cd.yml to run yarn release so that I can use a specific release strategy for each library.
Thank you for your patience, and once again, I apologize for the delay. I appreciate your continued support and guidance throughout this process.

@donaldxdonald re-opening this because I've updated this PR with all your changes and fixed the corrupted git history here.

Hi. I was looking for angular wrapper for embla and got here. I saw your code and i have multiple worries about it.

You don't init embla outside Angular (ngZone.runOutsideAngular), which can lead to performance issues; also SSR+hydration can break because of setTimeout calls inside mother library our some plugins api
You don't use inject() function, but instead you use ctor injection (which is not a best practice for now)
You don't use ';'. Which kind of codestyle is this?

I will cherry-pick your code soon and give you link to my repo with everything fixed.

@zip-fa thanks for chiming in.
Before you jump into making changes, please discuss it first and don’t assume you know everything better just because you say so. If something is better in your opinion you should be able to make a case and explain why you think it’s better. Don’t get me wrong, I don’t say that your input or ideas aren’t valuable. They probably are, but they just need to be discussed before put into action that’s all.
I can give you an answer for these two things:

also SSR+hydration can break because of setTimeout calls inside mother library our some plugins api

The code is using the function canUseDom() before initializing. Have you seen this? It prevents the Embla script from running at all on the server.

You don't use ';'. Which kind of codestyle is this?

This project uses prettier which is an automatic code formatter and it’s configured to not use semi colons. Even though prettier has a little bit of configurable options, it’s meant to put an end to religious discussions about code formatting so this is not up for discussion.
I’m going to let @donaldxdonald answer in point 2 because I don’t know much about how Angular works.
Best,
David

https://github.com/zip-fa/ng-embla-carousel
here you go.
We can discuss everything through twitter, maybe it would be better?
What did i do:

Do not use NgModule (because everything is standalone in 2023)
Use afterNextRender method (canUseDom() is redundant; afterNextRender WILL NOT be executed inside SSR)
ngZone.runOutsideAngular will ensure ChangeDetector to not trigger because of Embla's apis
Made your DI token optional (because why we need that much code with default factory? just don't provide token and that's all)

I saw unused @Output(), will you use it?

Take a look here (still dirty, but main idea shown):
@Input({ required: true })
  set ngEmblaCarousel(options: EmblaOptionsType) {
    this.options = options;
    this.reInit();
  }

  @Input({ alias: 'plugins' })
  set _plugins(plugins: EmblaPluginType[]) {
    this.plugins = plugins;
    this.reInit();
  }

ngOnChanges usage is redundant. Just use setters, they will be executed each time new value comes.
ngEmblaCarousel is required input, so i made it { required: true }, which enforce user to setup embla (if i got an idea correctly; we can discuss it and remove required option if i am wrong)
Also you have this code in your initial version:
emblaApi!: EmblaCarouselType
But emblaApi can be undefined inside ssr environment.
Sorry if i don't understand something, that's because i found embla-carousel two hours ago :)

Sorry for spamming, but one more thing.
Angular has new apis from v16:

afterNextRender  -> executes only inside browser environment; similar to afterViewInit()
DestroyRef.onDestroy() -> replacement to ngOnDestroy(). I bind destroy() callback only when i 100% sure embla is initialized (in browser environment)

There is a lot to do with my implementation, but it's much cleaner in terms of logic (codestyle can be changed to match your repo's style).

@zip-fa thank you for your input. If you want to demonstrate your ideas with your code and how you would do it, in order to make them more clear and avoid confusion, you can create a CodeSandbox like @donaldxdonald did here before he created this pull request.

Isn’t github repo not enough?
https://github.com/zip-fa/ng-embla-carousel/blob/dev/ng-embla-carousel/src/lib/ng-embla-carousel/ng-embla-carousel.directive.ts

@zip-fa a CodeSandbox can be tested and forked + edited in matter of a second compared to a GitHub repository that needs to be cloned, setup and it’s not as easy and fast to make iterations and share ideas. Until all agree upon the final product/solution it’s much faster to work with.

Got it. I’ll polish everything first and share you a minimal setup with codesandbox.
How about switching our conversation from github to twitter? Mine is: twitter.com/buzahuza

@zip-fa I would recommend to keep the conversation here either in a new discussion or in the original issue:

#18

And the reason for this is because it’s better to have everything in one place so devs can see what discussions led to the Angular wrapper becoming reality. And GitHub is the place for code and code related conversations whereas Twitter/X is a place for everything you can think of.
I would also encourage you to read the conversation between me and @donaldxdonald  in the original issue to understand what my vision with Embla is:

#18

Hi again.
I polished everything & added stackblitz example with everything working:
https://stackblitz-starters-4buajt.stackblitz.io
Github example updated too (library is buildable & demo working):
https://github.com/zip-fa/ng-embla-carousel
What have been done:
afterViewInit & hasDom() methods removed
Insted, i use afterNextRender hook:
constructor() {
  afterNextRender(
    () => this.init(),
    { phase: AfterRenderPhase.Write }
  );
}

It gets called only inside browser environment, so it's safe to manipulate DOM with it. Link to angular docs
I use inject() function instead of ctor DI
This is the new standard from v14 (which is released few years ago):
private readonly elementRef = inject(ElementRef);
private readonly globalOptions = inject(EMBLA_OPTIONS_TOKEN);
private readonly ngZone = inject(NgZone);
private readonly destroyRef = inject(DestroyRef);

I don't use ngOnDestroy
There is more cleaner approach: DestroyRef.onDestroy(), which will get called on template destruction.
I don't use NgModule
because why should i? standalone apis came to angular from v14 (which is deprecated already, and released few years ago)
I use ngZone.runOutside angular, because of performance-first implementation
scrollTo(index: number, jump?: boolean): void {
  this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollTo(index, jump));
}

scrollPrev(jump?: boolean): void {
  this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollPrev(jump));
}

scrollNext(jump?: boolean): void {
  this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollNext(jump));
}

private init(): void {
  if (this.globalOptions) {
    EmblaCarousel.globalOptions = this.globalOptions;
  }

  this.ngZone.runOutsideAngular(() => {
    this.emblaApi = EmblaCarousel(
      this.elementRef.nativeElement,
      this.options,
      this.plugins
    );

    this.listenEvents();
    this.destroyRef.onDestroy(() => this.destroy());
  });
}

private reInit(): void {
  if (!this.emblaApi) {
    return;
  }

  this.ngZone.runOutsideAngular(() => {
    this.emblaApi!.reInit(this.options, this.plugins);
  });
}

Because of how Angular works, we have to call ngZone.runOutsideAngular to not trigger ChangeDetection mechanism.
zone.js monkey-patches every event: setTimeout, setInterval, etc..., and when setInterval gets called, Angular's ChangeDetector triggers and app performance degrades.
https://github.com/davidjerleke/embla-carousel/assets/61551308/3b8df028-eb5c-426d-9da4-75bed3f9b0e8
https://github.com/davidjerleke/embla-carousel/assets/61551308/020f6e2e-9c38-40ef-8e58-497e41209741
Setters removed & ngOnChanges returned
... but with simpler logic. Since the main task is to call reInit() method each time plugins or options @Input() changes, i refactored ngOnChanges:
@Input({ alias: 'emblaCarousel' })
public options: EmblaOptionsType = {};

@Input({ alias: 'emblaPlugins' })
public plugins: EmblaPluginType[] = [];

ngOnChanges(changes: SimpleChanges) {
  const optionsChange = changes['options'] as SimpleChange | undefined;
  const pluginsChange = changes['plugins'] as SimpleChange | undefined;

  if(
    (optionsChange && !optionsChange.firstChange) ||
    (pluginsChange && !pluginsChange.firstChange)
  ) {
    this.reInit();
  }
}

Removed redundant helpers to compare objects, i just look at firstChange - that's all.
I implemented (emblaChange) event
Now, my directive reacts to every Embla event:
'init',
'pointerDown',
'pointerUp',
'slidesChanged',
'slidesInView',
'select',
'settle',
'destroy',
'reInit',
'resize'
By default, scroll is not included here, because it fires too often. It can be added with provideEmblaOptions in app.config.ts:
providers: [
  provideEmblaOptions({
       eventsThrottleTime: 100, // <-- configure throttle to avoid performance bottlenecks
      listenEvents: [
        'init',
        'pointerDown',
        'pointerUp',
        'slidesChanged',
        'slidesInView',
        'select',
        'settle',
        'destroy',
        'reInit',
        'resize',
        'scroll' // <-- manually add scroll here
      ]
  })
]

As you can see, there is eventsThrottleTime also.
I added throttler based on rxjs in my code, to fix scroll event, which fires too frequently:
private listenEvents(): void {
    const { eventsThrottleTime, listenEvents } = this.globalOptions;

    // This code is valid by the api design: `provideEmblaOptions({ eventsThrottleTime: undefined, listenEvents: undefined })`
    if (!eventsThrottleTime || !listenEvents) {
      return;
    }

    const eventsThrottler$ = new Subject<EmblaEventType>();

    eventsThrottler$
      .pipe(
        throttleTime(eventsThrottleTime),
        takeUntilDestroyed(this.destroyRef)
      )
      .subscribe((eventName) => {
        this.ngZone.run(() => this.emblaChange.emit(eventName));
      });

    this.ngZone.runOutsideAngular(() => {
      listenEvents.forEach((eventName) => {
        this.emblaApi!.on(eventName, () => eventsThrottler$.next(eventName));
      });
    });
  }

@zip-fa thanks for your efforts.

Removed redundant helpers to compare objects, i just look at firstChange - that's all.

How exactly does this work under the hood? When is it considered a change?

I implemented (emblaChange) event
Now, my directive reacts to every Embla event

I think you have missed the Embla vision. Please, no event and feature wrappers. Please read this comment in detail.

How exactly does this work under the hood? When is it considered a change? When the reference change?

Angular compares two objects (old and new), and then ngOnChanges triggers

Please, no event and feature wrappers

That's not how angular 3rd-party libs must work. By not wrapping embla's events and scrollTo/scrollPrev/scrollNext, you will break app performance. I attached two videos on how change detection works in Angular. Please take a look at them, you will notice how many times ChangeDetector is triggered. There is no other way for now, because zone.js is still a part of Angular. Angular's team will make it optional soon, but for now, if not wrap these three methods and every event - RIP for performance.
Also, i published my wrapper to npmjs for those who want to try

Angular compares two objects (old and new), and then ngOnChanges triggers

So this is a case where I start to doubt your judgement a bit because you say:

Removed redundant helpers to compare objects, i just look at firstChange - that's all.

How do you know they’re redundant? I don’t know if you read the discussion I encouraged you to do but me and @donaldxdonald already discussed this. The utilities are there to prevent the carousel from re-initializing unless options and plugins actually change. It doesn’t care about reference changes but it compares the options and plugin object contents. I don’t doubt that you mean well but it feels like you have a fixed idea of what it should be and this is only time consuming for me to go over again.

You can still access every embla api method, but it will lead to performance issues with manual subscription to events.

Are we talking about micro optimization and performance issues that no one will almost never notice or real problems? It’s hard for me to believe that Angular doesn’t have any way of exposing an API without destroying the browser? I have a hard time believing that. Unless you can’t prove a clear performance hit readability and vision always have the highest priority.
One problem with building another layer of API wrapping is that it needs to be maintained. Every time an event changes or gets added/removed it needs a code change. In contrast, the React, Vue and Svelte wrappers don’t need any manual labor to update as soon as the Embla API changes which is much better in the long run. Again, me and @donaldxdonald have already had this conversation so if you haven’t, please read the conversation here:

#18

Best,
David

That's not a micro-optimization. Your setInterval() code will trigger angular to re-check every template each time it executes (every 10ms in your case, check my videos please).

About ngOnChanges: i don't really understand why you want to put this double-check. Angular will not trigger ngOnChanges unless @Input() is really changed. Please add console.log() inside ngOnChanges on stackblitz and try to play with its values.
Embla APIs are still exposed, because they are public in @Directive() and can be accessed by developers.
I gave you two videos with Angular extension installed, where you can clearly see how it's ChangeDetector triggers, you ask me to prove what? Please do some research about this topic: performance bottlenecks and runOutsideAngular to better understand how Angular's change detection mechanism works. Sorry if it looks a bit rude, but i don't really understand what i have to prove if you didn't even watch my videos.
Best, zip-fa.

Hi @zip-fa ,
Sorry for my delayed response. I have been quite occupied recently and was unable to engage in the conversation in time. It's great to see more people contributing to the Angular wrapper!
I also agree with @davidjerleke that discussing it in one place (here) allows more developers who come here to know as much context as possible. These are my thoughts.
ngZone.runOutsideAngular
Yes, you're right, I realised later that I had to add this as well. But David said not to push new stuff until he's finished reviewing it. I just thought I'd update the code in a later version.
inject function vs constructor DI
I like to use the inject function as well. The first version of my example was based on Angular 13, which didn't have the inject function yet.
When I changed it to Angular 14, I didn't change it, and in my case, the difference is not a big problem. In my case, the difference is not a big problem. And neither the angular.io nor the angular.dev official Angular docs say that constructor DI is bad.
Do not use NgModule
The version I've provided doesn't force the use of ngModule, but instead provides both ngModule and standalone ways to use the library.
Considering that there are still a lot of Angular developers who prefer to use ngModule, as a library developer you have to consider the needs of a wider range of users.
the emblaChange Output
Yes, I forgot to delete it when updating up from the old code, and as David said, try to use a style that aligns with the version of the other framework.
Angular compares two objects (old and new), and then ngOnChanges triggers
The reason to use the "redundant" helper comes from here, the second one.
ngOnChanges detects changes to object values, but not to object property references. For example, a change in options as a whole will trigger change detection, but a change in options.active will not.
In fact, I think encapsulating options into more granular props would be more convenient because often we need to dynamically update a specific option.
afterNextRender, DestroyRef  and other new APIs
The new version of Angular is great. But as I said above, as library developers we should be thinking about covering more users, and as embla-carousel's first version of the Angular wrapper, I think support for covering more Angular versions is a more important thing. I chose to support Angular 14 as a minimum because the standalone component/directive starts here. Support for more new APIs could be added in perhaps a second release.
SSR  + hydration
Sorry I haven't used the new @angular/ssr. I've just used Angular Universal before and had a terrible experience. Maybe support can be added later.

Finally, I'd like to say that this version of mine started out as a way to share what I was using at work, since no one had contributed Angular wrapper code for a long time before. Then I worked with David to refine it.
I don't always have the time to maintain a follow-up to this code, so I chose to put the code in the main embla-carousel repository instead of my own. This allows more developers to keep improving it. So I will respect David's need for a consistent style. Of course, it's also possible to release another repository like you did separately.
I think technical communication is a great thing, and I welcome working together to improve the code.
Best regards

Hi @donaldxdonald.
Glad you joined that talk.
Performance
For me, as a developer, i don't want to wrap everything by myself with ngZone.runOutsideAngular. Library MUST support it out-of-the box, i don't want to really care about performance and make a repeated code.
Angular 14
It's not maintained anymore. Also, Angular 15 support will be dropped soon: https://angular.dev/reference/releases#release-schedule
Since afterRender and DestroyRef were introduced in v16, i guess sticking to V16 will be much better

NgModules
I don't really understand why we need to give developers "a choice" to use outdated pattern. You can use standalone APIs inside NgModules, but giving users a choice to use NgModules in standalone APIs is a bad idea.
Mutable changes
Recently, Angular dropped support of mutable changes inside signal() apis. And i think, mutating reactive data is a bad idea. Making CPU-consuming comparator functions just to support it.. seems like an anti-pattern.
Encapsulation of options into props
That would be a bad idea. Because that realisation must be maintained :) Please don't do this
SSR
Since v17, angular's ssr experience is great. I've "added support" for it just with afterRenderer (embla will not be initialized on the server, while slides will be rendered).

Hi again @zip-fa,

That's not a micro-optimization. Your setInterval() code will trigger angular to re-check every template each time it executes (every 10ms in your case, check my videos please).

I haven't said anything about using ngZone.runOutsideAngular() is a bad idea or wrong anywhere in my comments? I have no objections here and trust that you know this. I certainly don't know Angular and how it works.
My objection was that wrapping the Embla API in another layer requires more maintenance because it has to be updated as soon as any Embla event changes or gets added/removed.
About the setInterval() you mention that runs every 10ms. What interval are you talking about? Do you mean the init event wrapped in a setTimeout? If yes, the init event is deprecated, will be removed and is the only event that uses a timeout. Of course, you couldn't have known that it's deprecated so that's my bad. But it is and won't be a problem anymore. If no, please point me to the correct piece of code you're talking about so I can understand you better.

About ngOnChanges: i don't really understand why you want to put this double-check. Angular will not trigger ngOnChanges unless @Input() is really changed. Please add console.log() inside ngOnChanges on stackblitz and try to play with its values.

A double-check means that you check the exact same thing twice. This is certainly not the case with the areOptionsEqual and arePluginsEqual helpers. JavaScript objects are compared and stored by reference, not by value. An example:
const optionsA = { loop: true }
const optionsB = { loop: true }

console.log(optionsA === optionsB) // --> false

In the example above, the contents of the both option objects are identical but still, they are not considered equal, and a re-assignment of the options would trigger the ngOnChanges hook. In this case, I would argue that Embla shouldn't re-initialize because nothing has actually changed. The areOptionsEqual and arePluginsEqual helpers prevent Embla from re-initializing in these cases. And while my example is trivial and might seem to not happen in reality, it does. That's why it was introduced in the first place.

Embla APIs are still exposed, because they are public in @Directive() and can be accessed by developers.
I gave you two videos with Angular extension installed, where you can clearly see how it's ChangeDetector triggers, you ask me to prove what? Please do some research about this topic: performance bottlenecks and runOutsideAngular to better understand how Angular's change detection mechanism works. Sorry if it looks a bit rude, but i don't really understand what i have to prove if you didn't even watch my videos.

First off, I have watched your screen recordings and do appreciate the effort. And I don't think it makes sense to tell me to do the Angular research because if I knew and studied Angular I would have built the wrapper myself. I trust your knowledge and want to be constructive because I know how Embla works under the hood and I have a vision with Embla.
When we work as devs, it's not like customers comes to us and say "hey, build anything you want! We have no requirements!". Naturally, they have requirements about what kind of app/website they need and what features it should include. Similarly, me as the Embla creator and maintainer have a vision with Embla and I will have some requirements if you want to help out and create a library/framework wrapper. In this specific case an official Angular wrapper.
However, given the requirements, I don't want to dive in to details because I trust you to solve that as long as you respect the requirements. In some cases we might have to compromise because of framework limitations or similar and I understand that. You can see that this has been the case when me and @donaldxdonald had our conversation.
I've been part of building the react, vue and svelte wrappers and they all expose the raw API, have no problems with re-rendering the whole app all the time. They only do the minimum amount of things to give devs a seamless integration with their frameworks. And the best of all, they require no maintenance when the Embla API changes - because they expose the raw API. All of the above mentioned frameworks can do that. If you're telling me that Angular really can't expose an API without destroying the entire webpage and mean it, well maybe that's the case then.

I want to be constructive and don't want to control all details, I trust you guys on that and your competence. But please take a moment to read the requirements for an official library wrapper. There's no point for me in creating just another carousel library that works just as all others out there. Embla aims to solve the hardest technical challenges with building carousels, and the rest is up to the user utilizing its highly extensible API and plugin system.
Now I understand that there might be one or more requirements that aren't doable because of Angular limitations or another reason. If that's the case, all I'm asking for is that you take the time to explain why to me and what the alternatives are because I know nothing about Angular:
All library wrappers are minimal wrappers that just wrap the core embla-carousel package for seamless integration and what they do is basically the following:

Take options and plugins as parameters.
They run emblaApi.reInit() if options or plugins change (deep equality, not reference).
They expose a ref for users to freely attach to the DOM themselves.
They respect the globalOptions feature.
They expose the raw emblaApi for maximum flexibility.

I will take the embla-carousel-react example to explain:
import { useRef, useEffect, useState, useCallback } from 'react'
// Feel free to use this in your Angular wrapper 👇
import {
  areOptionsEqual,
  arePluginsEqual,
  canUseDOM
} from 'embla-carousel-reactive-utils'
import EmblaCarousel, {
  EmblaCarouselType,
  EmblaOptionsType,
  EmblaPluginType
} from 'embla-carousel'

type EmblaViewportRefType = <ViewportElement extends HTMLElement>(
  instance: ViewportElement | null
) => void

export type UseEmblaCarouselType = [
  EmblaViewportRefType,
  EmblaCarouselType | undefined
]

function useEmblaCarousel(
  options: EmblaOptionsType = {},
  plugins: EmblaPluginType[] = []
): UseEmblaCarouselType {
  const storedOptions = useRef(options)
  const storedPlugins = useRef(plugins)
  const [emblaApi, setEmblaApi] = useState<EmblaCarouselType>()
  const [viewport, setViewport] = useState<HTMLElement>()

  const reInit = useCallback(() => {
    if (emblaApi) emblaApi.reInit(storedOptions.current, storedPlugins.current)
  }, [emblaApi])

  useEffect(() => {
    // IF REF IS ATTACHED TO HTML - Initialise Embla and store the emblaApi which will be exposed
    if (canUseDOM() && viewport) {
      // GLOBAL OPTIONS - Make use of global options and pass it to the core library
      EmblaCarousel.globalOptions = useEmblaCarousel.globalOptions
      const newEmblaApi = EmblaCarousel(
        viewport,
        storedOptions.current,
        storedPlugins.current
      )
      setEmblaApi(newEmblaApi)
      return () => newEmblaApi.destroy()
    } else {
      // IF REF IS NOT ATTACHED TO HTML - Set emblaApi to undefined
      setEmblaApi(undefined)
    }
  }, [viewport, setEmblaApi])

 // IF OPTIONS CHANGE - Run emblaApi.reInit()
  useEffect(() => {
    // use areOptionsEqual() from the utils package to compare
    if (areOptionsEqual(storedOptions.current, options)) return
    storedOptions.current = options
    reInit()
  }, [options, reInit])

  // IF PLUGINS CHANGE - Run emblaApi.reInit()
  useEffect(() => {
    // use arePluginsEqual() from the utils package to compare
    if (arePluginsEqual(storedPlugins.current, plugins)) return
    storedPlugins.current = plugins
    reInit()
  }, [plugins, reInit])

  // EXPOSE - 0: A ref to attach to the DOM element that will be the carousel
  // EXPOSE - 1: The raw emblaApi
  return [<EmblaViewportRefType>setViewport, emblaApi]
}

useEmblaCarousel.globalOptions = <EmblaOptionsType | undefined>undefined

export default useEmblaCarousel

Usage:
import React, { useEffect } from 'react'
import useEmblaCarousel from 'embla-carousel-react'
import Autoplay from 'embla-carousel-autoplay'

export const EmblaCarousel = () => {
  // Usage of the useEmblaCarousel() wrapper
  const [emblaRef, emblaApi] = useEmblaCarousel({ loop: false }, [Autoplay()])

  useEffect(() => {
    if (emblaApi) {
      console.log(emblaApi.slideNodes()) // Access API
    }
  }, [emblaApi])

  return (
    <div className="embla" ref={emblaRef}>
      <div className="embla__container">
        <div className="embla__slide">Slide 1</div>
        <div className="embla__slide">Slide 2</div>
        <div className="embla__slide">Slide 3</div>
      </div>
    </div>
  )
}

Best,
David
Originally posted by @davidjerleke in https://github.com/davidjerleke/embla-carousel/issues/18#issuecomment-1670979561
Best,
David

And @donaldxdonald sorry about "freezing" this PR. You are all free to make new commits and continue working on this now that we have more devs like @zip-fa and @JeanMeche helping out. Let me know when you all are satisfied with the wrapper and I will just review basic things that are related to the repository setup and alike.
Best,
David

Since my holidays ended and i have to do my usual work, i will return to this PR and response at the end of this week.
However, i just published README for my implementation, you can check it out: https://github.com/zip-fa/ng-embla-carousel and cherry-pick whatever you want.
Thanks, will reach you asap!

@donaldxdonald so you guys are done then? Or do you want to add something more?
Best,
David

I have finished my part, and I'm unsure if @zip-fa and @JeanMeche  have any additional comments or suggestions.

@zip-fa, @JeanMeche do you want to add something?

Hi! Sorry for not replying, was busy. Gimme some time, i will check everything out!

Everything looks ok, but... there are two things that i am worried about:

Events listening
Raw embla api access for these methods: scrollTo, scrollPrev, scrollNext

Events listening
In this realisation, dev MUST write this code to simply subscribe to any of embla's event:
template.html:
<div
  ngx-embla
>
...
</div>

template.ts:
export class Component implements AfterViewInit {
  private ngZone = inject(NgZone);

  @ViewChild(EmblaDirective)
  private emblaDirective?: EmblaDirective;

  ngAfterViewInit(): void {
    // what if in this stage directive is not initiailized because of @if() logic ?
    // then dev must write setter for @ViewChild(EmblaDirective) to access it when it become available
    this.ngZone.runOutsideAngular(() => {
      this.emblaDirective?.emblaApi?.on('someEvent', () => {
        this.ngZone.run(() => this.doSomeLogic());
      });
    });
  }

  private doSomeLogic(): void {
    // application logic
  }
}

This looks like overkill to do that simple thing. I know you want to make it less time-consuming to maintain, but DX is better with these few lines of code inside directive: click here
In my realisation, code will become much simplier in terms of DX:
template.html:
<div
  ngx-embla
  [listenEvents]="['someEvent']"
  (emblaChange)="doSomeLogic()"
>
...
</div>

template.ts:
doSomeLogic(): void {
}

which wraps .on() method with ngZone.runOutsideAngular()
scrollTo, scrollPrev, scrollNext
These three methods calls depends on Animations.ts.
requestAnimationFrame() call will trigger ngZone to mark all app as dirty.
This this call is recursive:
(animate -> requestAnimationFrame(animate) -> animate -> requestAnimationFrame(animate)), and it triggers too much change detection, which kills app performance with this simple code (current realisation):
template.html:
<div
  ngx-embla
  #emblaRef="emblaNode"
>
...
</div>

<button (click)="emblaRef?.emblaApi.scrollPrev()">prev slide</button>
<button (click)="emblaRef?.emblaApi.scrollNext()">next slide</button>
``

You can check my video again, where i show how much times angular re-runs change-detection cycle for the **WHOLE APP**. I strongly recommend to wrap these three calls with runOutsideAngular() inside directive:

https://github.com/zip-fa/ng-embla-carousel/blob/53ba7e63d4a34475ee39745e62f39b027330681f/ng-embla-carousel/src/lib/embla-carousel/embla-carousel.directive.ts#L83C9-L83C9

@zip-fa I’m sorry if I wasn’t clear:
You are allowed to wrap the API with another layer if you want and if you think that’s the solution that makes sense. I just wanted share the Embla vision and what I think the aim should be with this wrapper (see requirements in this comment. The requirements should act as guidelines when building this wrapper.
My main concern with another layer of API wrapping is the maintenance that it requires so we should only do that when we don’t see another solution. But if that’s the only solution that makes sense, go with it!
Beat,
David

You are 100% right about maintenance cost of additional layer of wrappers
Angular is going to make zone.js optional, but in the next few years it will be part of Angular, so we need to make a wrapper. Sorry to say that, but that's the only solution here...

You are 100% right about maintenance cost of additional layer of wrappers
Angular is going to make zone.js optional, but in the next few years it will be part of Angular, so we need to make a wrapper. Sorry to say that, but that's the only solution here...

@zip-fa I understand. Then go with it 👍🏻!
Still, the raw API will still be exposed too right? To give users maximum flexibility?

Yeah, raw api is still exposed. You can play with it how you want. I made full documentation with examples on HOW IT WILL LOOK LIKE in official wrapper here:
https://github.com/zip-fa/ng-embla-carousel/tree/dev (check last paragraph - Access embla api)
Source code is here
What do we do with event listeners? Do you accept my solution?
If we agree on event listeners mechanism and on scrollTo, scrollPrev, scrollNext wrapper, then @donaldxdonald  can safely cherry-pick this from my code:

my scrollTo, scrollPrev, scrollNext wrappers
my listenEvents logic:

@Input()
public subscribeToEvents: EmblaEventType[] = [];

@Input()
public eventsThrottleTime = 100;

@Output()
public readonly emblaChange = new EventEmitter<EmblaEventType>();

  private init(): void {
  // logic here
  this.listenEvents():
  }

/**
   * `eventsThrottler$` Subject was made just because `scroll` event fires too often.
   */
  private listenEvents(): void {
    if (0 === this.subscribeToEvents.length) {
      return;
    }

    const eventsThrottler$ = new Subject<EmblaEventType>();

    eventsThrottler$
      .pipe(
        throttleTime(this.eventsThrottleTime),
        takeUntilDestroyed(this.destroyRef)
      )
      .subscribe((eventName) => {
        this.ngZone.run(() => this.emblaChange.emit(eventName));
      });

    this.ngZone.runOutsideAngular(() => {
      this.subscribeToEvents.forEach((eventName) => {
        this.emblaApi!.on(eventName, () => eventsThrottler$.next(eventName));
      });
    });
  }

@zip-fa thanks for the details. I’m going to let @donaldxdonald and @JeanMeche answer your questions here because I don’t know Angular. Let me know when you’re satisfied with the state of this PR and I will just skim through repository related stuff.
Thank you all for your time and efforts!
Best,
David

Update

[x] Changed directive's selector to emblaCarousel
[x] Added scrollTo, scrollPrev, scrollNext methods
[x] Added emblaChange event
[x] Updated the embla-carousel-playground-angular
[x] Updated Accessing the carousel API and Listening the carousel events in docs/get-started/angular.

scrollTo, scrollPrev, scrollNext methods
To reduce the maintenance cost, the parameters directly use the parameters of the embla API.
@Directive({})
export class EmblaCarouselDirective {

  scrollTo(...args: Parameters<EmblaCarouselType['scrollTo']>): void {
    this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollTo(...args))
  }

  scrollPrev(...args: Parameters<EmblaCarouselType['scrollPrev']>): void {
    this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollPrev(...args))
  }

  scrollNext(...args: Parameters<EmblaCarouselType['scrollNext']>): void {
    this.ngZone.runOutsideAngular(() => this.emblaApi?.scrollNext(...args))
  }

}

cc @zip-fa, @JeanMeche

any chances to get inside contributors?:))

any chances to get inside contributors list?:))

I agree, but it's up to @davidjerleke .

@donaldxdonald, @zip-fa, @JeanMeche you will all be added to the special thanks section in all package README’s, because you’ve made this happen 👍🏻.
@donaldxdonald you will also be added to the regular contributors list, because you created this PR and that list is automatically generated with the build process.
I can add all of you as co-authors when I squash all commits here before merging, but don’t know if that will add all of you as contributors here? Not sure if it works that way.
Best,
David

Special thanks section is already very pleasant for me. Thanks!

 Great work ⭐!
In addition to the comments I left I have one concern: It doesn't seem like the Angular bundler creates support for moduleResolution: nodeNext? Or maybe I did something wrong? Read more about it here:

Add "type: module" (nodenext) support alongside commonjs #481

Because all embla packages are hybrids and does support that. It's automatically added upon the package build process for each package. I'm just thinking that this problem will just get bigger soon as more devs start using it, and if the Angular build tool isn't doing extraordinary stuff it might be worth using the embla package bundler instead?
I look forward to your feedback.
Best, David

Hi, @davidjerleke ,
As mentioned earlier, Angular has its own build tool called the Angular CLI, which is based on Webpack (and esbuild starting from Angular v17+). With the Angular CLI, Angular developers don't have to worry about low-level bundling configurations, and the output is compatible with projects using the same or higher Angular versions. For example, embla-carousel-angular is built using Angular CLI v14, which means it can be used in almost all Angular 14+ projects without any issues.
Since its early days, the Angular CLI has been generating bundles only in the ECMAScript Modules (ESM) format (more info), and the Angular team does not recommend using CommonJS format libraries in Angular projects. Reference

It is recommended that you avoid depending on CommonJS modules in your Angular applications. Depending on CommonJS modules can prevent bundlers and minifiers from optimizing your application, which results in larger bundle sizes. Instead, it is recommended that you use ECMAScript modules in your entire application.

Compared to other UI frameworks, Angular is more like a true "framework," and around 99% of Angular projects/libraries use the Angular CLI for bundling. Unlike other frameworks, there are not many variations in "best practices." Therefore, as an Angular library, using the Angular CLI to build embla-carousel-angular is the most suitable approach.

@donaldxdonald thanks ⭐! Sorry for the late response. Me and my family got the flu.
About this wrapper - I've been having this nagging feeling that I don't understand how Angular works and therefore I don't understand you guys when you explain things to me. So in order to understand you guys better, I took this Angular course.
I just want to say that I'm sorry if I limited your plans for this Angular wrapper. I know understand that Angular is completely different from React, Vue, Svelte and Solid - Libraries of which I've been part of creating Embla wrappers for. This also made me realise that it makes sense that the Angular wrapper for Embla can be designed very differently from the other wrappers - Whether it should completelty wrap the whole Embla API, its methods and events or not, that's up to you and I won't interfere anything from now on.
I'm working on shared build tools and automating a lot of stuff in this repository for all the other wrappers - Which is doable because they're all very similar in how they work in contrast to Angular. So because Angular is so different in its nature, it might make sense that you @donaldxdonald, create a separate repository for the embla-carousel-angular wrapper? I see many benefits with this approach:

No need to always add special conditions for Angular as the Embla build tools and other automated tasks evolve.
You can build the Angular wrapper any way you want. Wrap the API entirely or not - I won't interfere at all.
You can make changes without waiting for my PR review and approval all the time which means faster changes. This will give you 100% control.
You will still have my blessing and even if the Angular wrapper is in a separate repository, it will be the official Angular wrapper for Embla.
You are very welcome to add Angular documentation to the official documentation website.
All of you guys that have contributed to the Angular wrapper will still be added to the special thanks section in the project README.

What do you think?
Best,
David

Hi @davidjerleke ,
I'm sorry for being busy lately and not replying promptly. As you suggested, creating a separate repository is definitely doable. I'll find some time in the next few days to organize the code. Take care : )

Hi @davidjerleke ,
The initial version of embla-carousel-angular has been released, and I will continue to maintain it. For the documentation I think it would be good to maintain it in one place, in the embla-carousel-angular repository. Thanks for the suggestion.
Repo: https://github.com/donaldxdonald/embla-carousel-angular
NPM: https://www.npmjs.com/package/embla-carousel-angular

@donaldxdonald that was fast. Nice work, I think it looks great 🚀!

For the documentation I think it would be good to maintain it in one place, in the embla-carousel-angular repository.

Makes sense. Let me know if you change your mind.
Is it ok for you if you if I add the Angular logo and link it to your repository here?

I think it would be good for devs to know that there's an official Angular wrapper out there 🙂.
Best,
David

Is it ok for you if I add the Angular logo and link it to your repository here?

I think it's a great idea. Thanks @davidjerleke !

Thanks for all your efforts here @donaldxdonald, @zip-fa and @JeanMeche!

@donaldxdonald I think this is cool: The first two users of embla-carousel-angular 🎉!

I've added the link to the Angular wrapper now:

On a side note
If you have a Reddit account you can share the news that embla-carousel-angular is out in an Angular group or similar. That could increase traction. Nice work ✨!


chore(integrations/parquet): add README

Which issue does this PR close?
close #4868
Rationale for this change
What changes are included in this PR?
Add README for integrations/parquet
Are there any user-facing changes?
No

Would you like to also add parquet_opendal in the For ANY integrations section of our README?


🐛 [Nextcloud] NC addon removes Collabora CODE Server when starting

Description
I have been having issues with this forever and I've tried every solution I could come across and I think that it's out of my hands at this point, I've noticed countless other people have this issue too regardless of their installation method but I am wondering if anyone has insight about this.
When I freshly install the Nextcloud Addon and set it up with the MariaDB Addon, I install Nextcloud Office and the proceeding Collabora CODE app but when I go to settings to try and configure nextcloud office I am greeted by the error in the logs provided.
On top of this, when I start nextcloud, everytime I notice that in the logs it says "Remove CODE if installed as not compatible" and it procceeds to remove CODE. Why is this? is it not compatible and why?
I am running Nextcloud with MariaDB on the latest version of both addons and latest home assistant. I am using ports 443 and 80 in order for domain use. Linux 6.1.74-haos x86_64.
Reproduction steps:

Install Nextcloud addon and setup with MariaDB
Change ports to 443/tcp and 80/tcp
Install Nextcloud office and CODE server
Voila you have recreated my situation.

Thank you so much to alexbelgium for creating this addon. It is extremley helpful and suits my needs perfectly. This issue is most likley not associated with the addon but rather nextcloud and collabora.
Reproduction steps
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Addon Logs
[richdocuments] Error: Failed to fetch the Collabora capabilities endpoint: cURL error 7: Failed to connect to homeassistant.local port 8099 after 3 ms: Couldn't connect to server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://homeassistant.local:8099/apps/richdocumentscode/proxy.php?req=/hosting/capabilities
	GET /index.php/settings/admin/richdocuments
	from <IP_ADDRESS> by ***** at Feb 23, 2024, 8:20:36 AM

[richdocuments] Error: Could not find urlsrc for application/vnd.openxmlformats-officedocument.wordprocessingml.document in WOPI discovery response
	GET /apps/richdocuments/settings/check
	from <IP_ADDRESS> by ***** at Feb 23, 2024, 8:16:25 AM

Architecture
amd64
OS
HAos

Hi, I think this was the cause : https://github.com/linuxserver/docker-nextcloud?tab=readme-ov-file#collaborative-editing


Capture-type texture resource

This is a new type of texture resource.
We can create a texture of a certain size—typically the viewable content—and spawn "event" objects: rather than draw to the screen, these will capture its contents to the texture. We can then sample this texture for our own images and effects.
Events "happen" (rather than draw) according to where they are in the display hierarchy: back-to-front, first-to-last. The event should be found before an object that wants to use it.
Kan posted a nice example on Discord, based on a preview version.

It's implemented with glBlitFramebuffer, when available; otherwise glCopyTexSubImage2D.
Seems to pass muster on Mac (M1), Windows, Android (emulator and device), iPhone and tvos (emulators).

I piggybacked the new classes, TextureResourceCapture and TextureResourceCaptureAdapter, into the corresponding canvas texture files. This was only to avoid adding new files and updating projects / makefiles; it would be fine to migrate them into their own files, if desired.
I made GetParent() a public method of LuaLibDisplay so that the capture event object could also use it. (This is also in the adapter file.)

I added some ContentToScreen() variants that don't do rounding. These might also have applicability elsewhere, e.g. the display.capture() family.
As mentioned in the next section, there is still a tiny bit of shimmer if capturing and immediately redisplaying in-place, possibly just a pixel in either dimension. It might be possible to solve even this, but didn't seem pressing.

Here's a sample:
capture.zip
The part in the green outline may be dragged around. This will drag the outline, the capture event object, and a circle that immediately redraws the captured contents: apart from a little shimmer, it resembles the background, as it should.
The captured contents are also drawn to a couple outlined rects along the right side.
Further, the rounded rect on the left captures one of those capture-displaying rects along with part of its neighborhood. The event object is later in the hierarchy than the green outline, so will show that, too, if it was in view.
Finally, the part up top shows a different area; however, its capture texture is the same as that for the rounded rect. This demonstrates that we can capture more than once, using separate event objects: an image will use the current result. (Due to its sequencing, this capture can also pick up the green outline.)

I also removed a few // STEVE CHANGE things that snuck into past PRs.

Some rough docs:
* system.getInfo, new option:

“gpuSupportsScaledCaptures”:

	If true, capture events are able to scale the region they capture. (TODO: at the moment this is disabled.)

and
graphics.newTexture, new option:

	If you provide “capture” as the type, you will get a capture-type texture.

	This requires “width” and “height” parameters: these are the content dimensions, starting from the upper-left corner, that you might want to capture. (Most usefully, this will be the viewable content width and height.)

	These properties may be read, as well as "pixelWidth" and "pixelHeight", i.e. the true texture dimension. The following method is also provided:

	* newCaptureEvent( [group, ]x, y ): this is called like display.*(), except invoked as a method (colon syntax).

	The result is a display object, in the sense that it resides in the display hierarchy and so is “drawn” at the expected time: the region of the content it occupies—centered on the event’s position, with the capture texture’s dimensions—is sent to the capture texture. (If offscreen, this is a no-op; if partially onscreen, only visible parts are updated.)

	If scaled captures are supported, the xScale and yScale may be used to scale the capture dimensions. (TODO: at the moment this is disabled.)

	Paints may then sample the capture texture to use the results. In particular, those sequenced after a capture event will pick up the most recent update.

	The event object is neither culled nor responsive to hit tests.

	GOTCHA: From Solar’s point of view, the capture will be upside-down.

About the disabled scaling:
On Mac, where I first tested everything, the view surface is created with some multisampling stuff. Other platforms might do likewise.
Unfortunately, rescaled draws require our target texture also have this information. It seemed annoying to try to make these agree—on either side—thus the disabling for now.
It did appear to work when stripping that stuff from the view surface configuration.

On Android, there seems to be a GL_EXT_blit_framebuffer_params extension. (My own phone had neither this nor the ANGLE and NV extensions I'm checking.) The only reference to this I've seen online was... in extension lists. sigh
It certainly sounds relevant, and I have guesses about what it might do, but probably will have to ask in a Khronos forum / server or something for actual details. At any rate, the glCopyTexSubImage2D approach seemed to run okay.

I was discussing the Vulkan backend with somebody earlier and I just realized that HasFramebufferBlit() probably should not return the "can rescale captures" property: that makes sense in GL but I think in Vulkan you would forgo the FBOs and use the copy / blit image commands. I was hoping to submit a fix for that (with separate CanRescaleCaptures() methods) but my synchronization is a bit of a mess. 😄


Completed implimentation of lamppost reprocessor

Added AGN reprocessor class
Added AGN reprocessor methods
Added variability method to produce a signal from broken power law Added variability method to produce a signal from arbitrary PSD Added testing for all classes / methods / functions
Sorry, this became a much heftier PR than I expected!
I also would like to thank Josh Fagin for his assistance in making the function "generate_signal()", but I don't know how to do that properly.

Okay, I think I am content with my changes now! I've been running my own tests which I will include in the notebook.

Okay, I think I am content with my changes now! I've been running my own tests which I will include in the notebook.

Great!

Hi @Henry-Best-01, looks good to me!


Update ast.fs

Fix small typo in the documenation of TraitCall

This repo is deprecated in favour of https://github.com/dotnet/fsharp/ , and in that newer repo the line doesn't have a comment anymore: https://github.com/dotnet/fsharp/blob/70499ce779ffeeda0a1d96761a184981baf762ef/src/Compiler/SyntaxTree/SyntaxTree.fs


Remove BasicAuth

HTTP Basic Auth is now available via the separate project (finagle-http-auth). Fixes #705.

Current coverage is 78.54% (diff: 100%)

Merging #720 into master will increase coverage by 0.30%

@@             master       #720   diff @@
==========================================
  Files            34         34
  Lines           671        648    -23
  Methods         648        624    -24
  Messages          0          0
  Branches         23         24     +1
==========================================
- Hits            525        509    -16
+ Misses          146        139     -7
  Partials          0          0

Powered by Codecov. Last update c65a737...ef9a7f8


I've been meaning to ask you this, can you add more events/notetypes? Like a danger notetype, a Change Stage event, possibly Modchart events (plural for arrow transparency moving arrows etc...) and maybe... More?

What is your question?
I've been meaning to ask you this, can you add more events/notetypes? Like a danger notetype, a Change Stage event, possibly Modchart events (plural for arrow transparency moving arrows etc...) and maybe... More?

Yes, you can add a danger notetype that has a same function as a hurtnote.
But a change stage event is not possible.
And modcharts are basically done with .Lua.

stop requesting this
just learn how to do the thing itself with code omfg
hhhh

No, not that, like add them to OFFICIAL psych engine
On Mon, Dec 13, 2021 at 8:42 PM ShadowMario @.***>
wrote:

Closed #2073 https://github.com/ShadowMario/FNF-PsychEngine/issues/2073.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ShadowMario/FNF-PsychEngine/issues/2073#event-5759256276,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV6ID3PV6TOUNSJ3ASCP4BDUQZEARANCNFSM5J65W5SA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

What is your question?
I've been meaning to ask you this, can you add more events/notetypes? Like a danger notetype, a Change Stage event, possibly Modchart events (plural for arrow transparency moving arrows etc...) and maybe... More?

Yes, you can add a danger notetype that has a same function as a hurtnote. But a change stage event is not possible. And modcharts are basically done with .Lua.

erm, actually.


Issue while running the Transfer sample 04: Open Telemetry.

I am trying to run the Transfer sample 04: Open Telemetry. But after running the docker command it failed to start the `transfer-04-open-telemetry_consumer_1'.
Describe the Bug
Fails to run the Transfer sample 04: Open Telemetry.
Expected Behavior
Expecting all the containers to start while running the docker up comand.
Observed Behavior
transfer-04-open-telemetry_consumer_1 exited with code 255 Aborting on container exit... Stopping transfer-04-open-telemetry_provider_1 ... done Stopping prometheus                            ... done Stopping transfer-04-open-telemetry_jaeger_1   ... done ERROR: 255
I am also attaching the screenshot of the docker log from the docker.
Docker error log for the consumer_1

Steps to Reproduce
Steps to reproduce the behavior:

Go to Transfer sample 04: Open Telemetry
run
./gradlew transfer:transfer-04-open-telemetry:open-telemetry-consumer:build transfer:transfer-04-open-telemetry:open-telemetry-provider:build docker-compose -f transfer/transfer-04-open-telemetry/docker-compose.yaml up --abort-on-container-exit

This issue not resolved till now, but the ticket is closed.
I am getting the same error as explained above, The below is the final result after running docker command.
transfer-04-open-telemetry-consumer-1 exited with code 255 Aborting on container exit... [+] Stopping 4/4  ✔ Container transfer-04-open-telemetry-jaeger-1    Stopped                                                                                0.2s   ✔ Container prometheus                             Stopped                                                                                0.3s   ✔ Container transfer-04-open-telemetry-consumer-1  Stopped                                                                                0.0s   ✔ Container transfer-04-open-telemetry-provider-1  Stopped
The docker error log is give below.

@majadlymhmd has discovered the error, WiP

should have been fixed by #128 and #132


Remove terminal specific command from e2e source test file

What is the purpose of this change? What does it change?

Update the test file to run it on all oc supported platform including windows
Was the change discussed in an issue?
fixes Part of #1129

How to test changes?

make test-source-e2e

:white_check_mark: odo build 1863 completed and artifacts can be found here (for commit https://github.com/redhat-developer/odo/commit/91e599d5c9 by @amitkrout)

:white_check_mark: odo build 1874 completed and artifacts can be found here (for commit https://github.com/redhat-developer/odo/commit/fa59491985 by @amitkrout)

/assign

/hold
Needs more feedback

/test ci/prow/unit

/test unit

/assign gramnani

/assign girishramnani

@girishramnani once you are good with pr dont forget to do "/lgtm" and "/hold cancel". You dont need to do anything else. Just make sure they are on separate lines (not necessarily separate comments)

/lgtm

/hold cancel

/refresh

/refresh

/retest

:white_check_mark: odo build 1936 completed and artifacts can be found here (for commit https://github.com/redhat-developer/odo/commit/930d3ba251 by @amitkrout)

/refresh

/label needs-rebase

/lgtm

:white_check_mark: odo build 1944 completed and artifacts can be found here (for commit https://github.com/redhat-developer/odo/commit/7b68a5ca4c by @amitkrout)


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_91984236-30ab-43a6-856f-e1dd2a9eebbb/pull/1 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target_91984236-30ab-43a6-856f-e1dd2a9eebbb.git

Docs Build status updates of commit 0997671:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-RuningBuildFailed] Some unexpected errors happened when running build, please open a ticket in https://aka.ms/SiteHelp and include the error report for our team to troubleshoot

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Dashboard links are leading to Internal Error when user is not logged in

Bug description
We are using apache-superset version 3.0.3
When a user that is not logged in tries to reach a dashboard link (e.g: https://<superset_domain>/superset/dashboard/<dashboard_id>/) he get Internal server error (500)
The error message in logs

Traceback (most recent call last):
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py", line 137, in wraps
return f(self, *args, **kwargs)
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/utils/log.py", line 253, in wrapper
value = f(*args, add_extra_log_payload=log, **kwargs)
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/core.py", line 898, in dashboard
"user": bootstrap_user_data(g.user, include_perms=True),
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py", line 97, in bootstrap_user_data
roles, permissions = get_permissions(user)
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py", line 111, in get_permissions
roles_permissions = security_manager.get_user_roles_permissions(user)
File "/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/sqla/manager.py", line 420, in get_user_roles_permissions
result[role.name] = []
AttributeError: 'NoneType' object has no attribute 'name'

I think it's important to mention that are using Google/ Dex for authentication so we SupersetSecurityManager override with CustomSsoSecurityManager based on this doc

How to reproduce the bug

Go to a randomly superset's dashboard page
Copy this link
Log out from your account
Go to the copied link

Screenshots/recordings
No response
Superset version
3.1.2
Python version
3.10
Node version
16
Browser
Chrome
Additional context
No response
Checklist

[X] I have searched Superset docs and Slack and didn't find a solution to my problem.
[ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
[X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Are you actually seeing a 500 in your logs? This seems truthful. According to your error, it sounds like on line 420, you should throw a 403 and/or redirect to the login page.

Are you actually seeing a 500 in your logs? This seems truthful. According to your error, it sounds like on line 420, you should throw a 403 and/or redirect to the login page.

It's within flask_appbuilder python package. I can't control that.

Ahh... then perhaps @dpgaspar will have some insight.

I was able to pass this error with
AUTH_ROLE_PUBLIC = "Public"
in superset_config.py


How to use one tracker instance in different files

example:
index.js
import { GoogleAnalyticsTracker } from 'react-native-google-analytics-bridge';
let tracker = new GoogleAnalyticsTracker('UA-----');
tracker.trackScreenView('index');
other-page.js
tracker.setUser('user-id')

Hi @em222iv,
Please look through the issues before posting a new one, this has already been answered in #104

My bad, thanks!


FEATURE REQUEST: Real-time translate markdown in the chat box - reported by @ahmdshrif

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Problem :
When pasting stylized text (e.g. a word like "Bold") into the New Expensify chat box it shows the markdown style before it is actually applied (i.e. "*" on either side of "Bold") rather then after the markdown style is applied (i.e. exactly how it was copied "Bold"). This can be confusing to users without knowledge of markdown styles making them less confident in what the output of their chat box text will look like.
Solution :
Translate markdown styles in realtime (i.e. before a message is actually sent) when typing in the New Expensify chat box. This shows the user exactly how the text will look before they send it.
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.1.79-0
Reproducible in staging?:
Reproducible in production?:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43995119/177471091-1c638e61-6ddd-4465-a3ae-f0ef200d1743.mov
Expensify/Expensify Issue URL:
Issue reported by: @ahmdshrif
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1656504234548779
View all open jobs on GitHub

I thought this was already rejected on Slack. Even if we want to rethink it. A better Problem statement is needed to think it through.

Cool, I found the problem hard to understand at first glance but on reading the thread I'd suggest something closer to:
"Problem:
When pasting stylized text (e.g. a word like "Bold") into the New Expensify chat box it shows the markdown style before it is actually applied (i.e. "*" on either side of "Bold") rather then after the markdown style is applied (i.e. exactly how it was copied "Bold"). This can be confusing to users without knowledge of markdown styles making them less confident in what the output of their chat box text will look like.
Solution:
Translate markdown styles in realtime (i.e. before a message is actually sent) when typing in the New Expensify chat box. This shows the user exactly how the text will look before they send it."
As a first step before bringing to What's Next I can update the original post here if you all agree that is clearer and accurate to the proposal

Checking on best next steps internally, will report back

Hey @ahmdshrif! Thanks for your patience. Thank you for the feature request however we're not going to move forward with it at this time. The problem is not one actively experienced by Expensify users. Thats not to say it won't be in the future and we can revisit it if that turns out to be the case


bug with UNION ALL on 1.19

Version
Other
What happened?
A bug happened!
Relevant log output
I have sqlc update from brew to 1.19 and realise this could not compile but work in PostgreSQL. Used to work prior to 1.19.

SELECT listing_id as listingid FROM reviews r
WHERE cast(r.listing_id as int) < $1 AND cast(enddate_unixtime as int) > extract(epoch FROM now())::int
UNION ALL
SELECT listing_id as listingid FROM articles a
WHERE cast(listing_id as int) < $1 AND cast(enddate_unixtime as int) > extract(epoch FROM now())::int
ORDER BY listingid DESC FETCH FIRST 10 ROWS ONLY;

Error refer to ORDER BY listingid
# package db
... column reference "listingid" not found: if you want to skip this validation, set 'strict_order_by' to false

### Database schema

```sql
NA

SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
No response
What database engines are you using?
No response
What type of code are you generating?
No response

Similar to #2419 ?

Until we get this fixed, can you set strict_order_by to true in your configuration file?

Until we get this fixed, can you set strict_order_by to true in your configuration file?

I wound up just doing ORDER BY 1 as a workaround and it worked fine.  Thanks for the speedy fix!


Doc Feedback: missing " in username password

Location : https://apim.docs.wso2.com/en/latest/Learn/Extensions/SAML2SSO/configuring-identity-server-as-idp-for-sso/
think the username and password should be between ""
[database.shared_db]
type = "mysql"
url = "jdbc:mysql://localhost:3306/410_um_db"
username = wso2carbon
password = wso2carbon

This has been fixed.


Visual Step Editing

The user drags and drop steps from the catalog into the graphical editing canvas to add new steps.
The user then edits the properties of the step.
The user can reorder the steps.
The user can replace existing steps with others from the catalog.

[x] #144
[x] #8
[ ] #145

Closing as we are using #145 as the main epic now.


Release cards CSS as v2.0-alpha-1

The components CSS is building with #773 so we want to do a pre-release of the v2.0 package.
https://help.github.com/articles/creating-releases/

Looking at #754 to fix a few small issues now.

Let me know when the v2.0 branch is ready for alpha relase and I will start preparing a release branch.

@saadmhybris I opened PR #776 for the card updates. If that is good, the cards can be released. Those basic card types should be enough to test.

Why this issue have no assignee? Who is in charge of this one?
Before releasing we need to finish these reviews
https://github.com/SAP/techne/issues/778
https://github.com/SAP/techne/issues/777
https://github.com/SAP/techne/issues/754


Initial commit of files from adv module template.

The template contains the psake-based build script and functions that will become the core of this module.

Hi @rkeithhill, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;


launcher uses old branch dev1.3

cm_cloudmesh_launcher.py used the old branch which contains outdated image name futuregrid/ubuntu-14.04.

Fixed. 59714856d8b01b532b1875acc3cf4c31e3b79854


Update coverage for nativelink-config and nativelink-error

Description
Increase coverage percentage to 80-100% for nativelink-config and nativelink-error modules
Fixes #1401
Type of change

[x] New feature (non-breaking change which adds functionality)

Checklist

[x] Updated documentation if needed
[x] Tests added/amended

This change is

Thanks for the detailed instructions!
I'll follow the instructions on how to test with Bazel and try to fix the formatting issue. Running nix develop seems like a good way to keep your CI and environment in sync.
I'll also double check the review status and see if the discussion with @allada is resolved.
Thanks for the help!
I'll fix the issue as is.

Including the prost and codegen functions was my choice to simplify code generation and message parsing.
However, it seems unnecessary here.
So I'm going to remove it.
It's also important to note that while consistency in string format can improve code readability and maintainability when switching from raw strings (r#"") to regular strings ("") in your code, the choice between raw strings and regular strings is not always a critical factor. Raw strings are typically used when dealing with complex JSON input that contains escape sequences like \n or ". In the absence of these escape sequences, regular strings can represent the data structure more cleanly and concisely.
I fixed the code by doing everything correctly.
I also added error messages to help identify the cause of the error.


[KYUUBI #5816] Change spark rule class to object or case class

:mag: Description
Issue References 🔗

This pull request fixes #5816
Describe Your Solution 🔧
Types of changes :bookmark:

[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Test Plan 🧪
Behavior Without This Pull Request :coffin:
Behavior With This Pull Request :tada:
Related Unit Tests

Checklists
📝 Author Self Checklist

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] This patch was not authored or co-authored using Generative Tooling

📝 Committer Pre-Merge Checklist

[ ] Pull request title is okay.
[ ] No license issues.
[ ] Milestone correctly set?
[ ] Test coverage is ok
[ ] Assignees are selected.
[ ] Minimum number of approvals
[ ] No changes are requested

Be nice. Be informative.

Codecov Report
Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (762ccd8) 61.37% compared to head (437dd1f) 61.39%.
Report is 1 commits behind head on master.

Files
Patch %
Lines

.../plugin/spark/authz/ranger/RuleAuthorization.scala
0.00%
1 Missing :warning:

.../authz/rule/RuleEliminatePermanentViewMarker.scala
0.00%
1 Missing :warning:

...hz/rule/rowfilter/FilterDataSourceV2Strategy.scala
0.00%
1 Missing :warning:

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5817      +/-   ##
============================================
+ Coverage     61.37%   61.39%   +0.01%
  Complexity       23       23
============================================
  Files           608      608
  Lines         35941    35941
  Branches       4940     4939       -1
============================================
+ Hits          22060    22067       +7
- Misses        11488    11492       +4
+ Partials       2393     2382      -11

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

thanks, merged to master

Thanks, @pan3793 @cxzl25 @wForget

Author Self Checklist

@zml1206 Consider fulfilling the list

Committer Pre-Merge Checklist

@wForget @pan3793 @cxzl25  Consider fulfilling the list


Concurrent trybuild tests lead to artifact name conflicts

I am seeing test result anomalies accompanied by such messages:
STDERR:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: no bin target named `trybuild001`

Did you mean `trybuild000`?
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

We have multiple test functions that invoke trybuild. My interpretation of the situation is that the trybuild test artifacts end up as `target\tests\trybuild\x86_64-pc-windows-msvc\debug\trybuild000.exe" and it sounds like in our case they are conflicting between different trybuild tests, each of which try to build artifacts with the same indexes.
Is there an intentional limitation where only the pattern with a single #[test] fn ui { ... } is supported? If so, I suggest documenting this.

My team has also experienced this. Occasionally, our trybuild tests fail with the error message that you reported.


adjust CASCADE and RESTRICT in i18n/migrations/schema-*.sql

complementary changes in other dbms for #17976
These changes reflect exactly what the migration is doing.
ON DELETE CASCADE for all dbms
ON UPDATE RESTRICT for all except mssql
ON UPDATE NO ACTION for mssql

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
✔/❌

Tests pass?
✔

Fixed issues
fixes #17975

Merged in https://github.com/yiisoft/yii2/commit/d07cbdaab3e467d1a8875249d17db04af8e79864. Thanks!


Can not start without fix train.py

Have bug, described bellow:
File "../trivialaugment/TrivialAugment/train.py", line 353, in spawn_process
assert worldsize == C.get()['gpus'], f"Did not specify the number of GPUs in Config with which it was started: {worldsize} vs {C.get()['gpus']}"
It happens due to incorrect unpacking "args.config". need to use "args.config[0]" instead "args.config" (line: 343-344).
After this it work right :)

I also encountered this bug.
File " .../trivialaugnent-naster/TrivialAugnent/train.py" , line 348，in spawn_process
assert worldsize == C.get()[ 'gpus ']，f"Did not specify the nunber of CPus inConfig with which it was started: {worldsize} vs {C.get()[ 'gpus']]”
File "/root/ENTER/envs/trivial/lib/python3.8/site-packages/theconf-0.1.7-py3.8.egg/theconf/config.py" , line 126, in__getitem__
_return self.conf[ key]
KeyError : 'gpus'
I haven't solved it yet, looking forward to the author's answer. Thanks!

Just as a quick follow up, in your config file there is a gpus key? Just to be sure. I am trying to reproduce this right now on my end.

I just gave it a try installing all dependencies anew and cloning this repo and the training command from the README did not throw the error you had. So maybe try this command just like it is in the readme and re-install the dependencies. :)


Translations update from Weblate

Translations update from Weblate for mattermost-languages-shipped/mattermost-mobile_master.

/update-branch


Fix binsh dep; provider priority; provider for explicit package

Tests are failing, but otherwise looks OK.

Yeah, my fault. Need to update the tests


Add urllib library in pre request script for python.

urllib is use for transforming request as in required.

fixed by #230 #222


Complete overwrite of files

Wanted to update my template to follow this repo and some conflicts emerged. I proceeded with git blame to see when and why some of the changes occured and saw the commits 85d4b9657f11ce3e9b7a731d4f122da84b2029c1 and 34612638be74ed919067c3dae61df57fab3ba690. Why overwrite?

  The files should be the same as before the overwrite though.

They were the same.  The
files should be the same as before the overwrite though.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chiehrosswang/TRB_LaTeX_tex/issues/21?email_source=notifications&email_token=ABPAHOTDVN4IZ5XPNKH6M6DQA4QBDA5CNFSM4IGBRVV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2TQL3Y#issuecomment-514262511,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPAHOT253QYYEPUQIUFCCLQA4QBDANCNFSM4IGBRVVQ
.

Good.  Glad I didn't break anything :)


x/tools/gopls: renaming an imported package name does not rename the imported package itself

Type: Bug
step 1, have a very simple application file app/mapper.go and a simple test file in the same package, but a different directory app_test/mapper_test.go
both have first line 'package app'
step 2, start fixing your file structure, create a new directory named 'mapper' and put mapper.go and mapper_test.go both in there.
step 3, change the package for mapper to 'package mapper' and mapper_test to 'package mapper_test'
step 4, right click the 'app' in rooms := &app.Generate()
step 5, left-click Rename Symbol
step 6, type in 'mapper' to match the package name properly
step 7, ctrl + s saves the file
Import list before step 7
import (
"data-algo/app"
"fmt"
"math/rand"
"testing"
"time"
)
after step 7
import (
mapper "data-algo/app"
"fmt"
"math/rand"
"testing"
"time"
)
I have many folders I'm fixing like this and I repeated this bug consistently
Extension version: 0.41.4
VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:02:43.666Z)
OS version: Linux x64 6.6.25-01713-g2f237acc8e50
Modes:

System Info

Item
Value

CPUs
Intel(R) Celeron(R) N4500 @ 1.10GHz (2 x 0)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: disabled_offopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
0, 1, 1

Memory (System)
2.68GB (1.94GB free)

Process Argv
. --crash-reporter-id 3a1bcf46-b7c7-4601-b24a-48d4ebbe4fd8

Screen Reader
no

VM
100%

DESKTOP_SESSION
undefined

XDG_CURRENT_DESKTOP
X-Generic

XDG_SESSION_DESKTOP
undefined

XDG_SESSION_TYPE
wayland

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:31067544
chatpanelt:31048053
dsvsc021:30996838
g316j359:31013175
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
pythonprt:31056678
dwnewjupyter:31046869
newcmakeconfigv2:31071590

@findleyr wonders whether issue 2 may have been affected by https://go.dev/cl/590377.
Could you try again after installing today's v0.16 release of gopls?
go install  golang.org/x/tools/gopls@latest

Issue 2:

another odd behavior along the same line

I tried to reproduce this using the encoding/xml and encoding/json packages, which both define NewEncoder:

add var _ = xml.NewEncoder and save file. import "encoding/xml" appears.
replace "xml." with "json." and save file.  The import changes to "encoding/json".
add var _ = xml. and start typing. Completions within xml package are observed, even though it is not imported.
hit tab to accept completion.  import "encoding/xml" appears. (We now have both imports.) This is normal.
If instead of the previous two steps, we replace the existing var _ = json... with var _ = xml., then start typing NewEnc, accepting the completion adds an xml import but doesn't remove the json import that is no longer needed. This too is normal; redundant imports are not removed until the file is saved.

If you see something different, could you please give instructions for reproducing it with these standard library symbols? Ideally this should be a separate GitHub issue, since it is unrelated to the other two items.

I installed the latest gopls as per @findleyr  and followed the steps for issue 2 and everything behaved as you described as normal with the redundant imports not being removed until saving the file and the xml completions showing before the package is imported on-save.

As far as I can tell from discussion, this is working as intended. Please correct me if I'm wrong.


golf: use compute_degree_le to restore a mathlib3 proof

This PR simply uses the tactic compute_degree_le in #5882 to remove a porting note.

[ ] depends on: #5882, where the tactic compute_degree_le is defined

This PR/issue depends on:

leanprover-community/mathlib4#5882
By Dependent Issues (🤖). Happy coding!

This PR was a sample usage of a tactic compute_degree_le in a PR that is now closed.


Elmish.XamarinForms template does not build after generation

After using the dotnet new elmish-forms-app -lang F# -n SqueakyApp command as specified in the Getting Started guide the app and my project does not build.
Using msbuild I get the following:
Project "/Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Debug|Any CPU".
ValidateProjects:
  The project "SqueakyApp.iOS" is not selected for building in solution configuration "Debug|Any CPU".
Project "/Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.sln" (1) is building "/Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.Android/SqueakyApp.Android.fsproj" (3) on node 1 (default targets).
RestorePackages:
  mono --runtime=v4.0.30319 /Users/eric/Projects/testywestyelmish/SqueakyApp/.nuget/NuGet.exe install "packages.config" -source "https://www.nuget.org/api/v2/"   -RequireConsent -solutionDir "/Users/eric/Projects/testywestyelmish/SqueakyApp/"
  Restoring NuGet packages...
  To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages'.
  Feeds used:
    /Users/eric/.nuget/packages/
    https://www.nuget.org/api/v2/

  All packages listed in /Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.Android/packages.config are already installed.
_SetLatestTargetFrameworkVersion:
   Found Android SDK. API levels: 15, 19, 23
_ValidateAndroidPackageProperties:
    PackageName: com.companyname
Done Building Project "/Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.Android/SqueakyApp.Android.fsproj" (default targets) -- FAILED.
Done Building Project "/Users/eric/Projects/testywestyelmish/SqueakyApp/SqueakyApp.sln" (default targets) -- FAILED.

Build FAILED.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:03.32

If I open it in Visual Studio I get an immediate error about the project file format being wrong:
/Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Error: Duplicate 'Compile' items were included. The .NET SDK includes 'Compile' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultCompileItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'SqueakyApp.fs' (SqueakyApp)

Which version of dotnet are you running?
dotnet --version

Also, 5.2.0 a very old version of Mono.


[Settings] Crosshair icon

Summary of the Pull Request

Added Crosshair icon
Some minor sizing tweaks to render the bitmap icons better on the Mouse utils page.

Quality Checklist

[X] Linked issue: #15640
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@jaimecbernardo would be great if we can get this in before we ship this utility :)

Where does this need a fluent icon?

Where does this need a fluent icon?

Settings page


Sticky Tailwind - Chapter Table of Contents on Scroll

Sticky won't work.  Apparently the ancestors are wrong?
Tailwind Sticky
MDN Sticky
As a next step, make a CodePen and post to Mr. CSS's Discord.

now have sidebar from shadcn


systemvm: Agent state is always Up

ISSUE TYPE

Bug Report

COMPONENT NAME

Systemvm

CLOUDSTACK VERSION

4.14

CONFIGURATION

OS / ENVIRONMENT

SUMMARY

This is regression issue of #3870
the agent state of systemvm should NOT be the state of host, but the state of cloud service in systemvms.
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

@DaanHoogland @rhtyd
here is a bug report.
Unfortunately I cannot find the systemvm information in host table.
Must be something wrong in 4.14.

Probably I used the hostvo the systemvm was on, instead of hostvo of the ssvm/cpvm.

Probably I used the hostvo the systemvm was on, instead of hostvo of the ssvm/cpvm.

should be caused by it.
update: when cloud service is running well, I can see the records in host table for systemvms.

Submitted PR #3876 please review Wei.

PR merged to 4.13 and fwd-merged to master https://github.com/apache/cloudstack/pull/3876


Cant compile on osx 10.15.4

OS: OSX Catalina 10.15.4
Node version: 14.3.0
media-server-node version: 0.94.8
node-gyp version: 7.0.0
npm i error log:
log
Note:   git submodule update --init --recursive  didn't work
Thanks in advance.

Only Node v8 and v10 is supported - SWIG hasn't been updated for v12+ yet.


Voice analysis functions

This PR introduces functions for helping with voice analysis, such as dysarthric speech detection.
The planned functions are as follows:

[x] Estimate f0
[x] Jitter
[x] Shimmer
[x] Harmonic energy

This provides a start, more may get added later.
See this notebook with a brief analysis, which could be turned into a tutorial with a public audio file: https://github.com/pplantinga/ParkinsonSpeechAI/blob/42512575d2405f114f11f2d332b0b002647d05bd/voice-analysis.ipynb

@pplantinga let me know if you are satisfied with this PR, it looks good to me. Maybe we may want to provide a tutorial or a short example?

Let's wait on this, I'm still tweaking it and a tutorial would be nice too

Tutorial is added, ready for review.


fix: domain flag is respected

The --domains and --no-domains flags ended up backwards when the flag name was changed. I replaced the internal skipDomains option with a domains option to match to cli flag, to avoid this sort of confusion in the future.

D'oh! Thanks!

Released in 0.14.1!


feat: add post-icon stories

Preview environments are getting posted here, as soon as they are ready!


Pegdown processor hangs when data to be parsed is html

I am trying to read from a URL for which i do not have access, so its redirecting to login page. So the data input to pegDownProcessor.markdownToHtml(data) is actually HTML.
I was expecting either null or parsing exception but it hangs at markdownToHtml(data).
Here is my code:
//url = http://localhost:8098/download/attachments/3145973/basics.text?version=1&modificationDate=1449060565788&api=v2
InputStream stream = getUrlStream(info, profileHelper, url, false, getSessionCookie(info, url));
String data = ScriptUtils.getStreamAsString(stream, info.getMacroParams().getString("encoding", ""));
PegDownProcessor pegDownProcessor = new PegDownProcessor(Extensions.ALL - (hardwraps ? 0 : Extensions.HARDWRAPS)+ (allowHtml ? 0 : Extensions.SUPPRESS_ALL_HTML));
processed = pegDownProcessor.markdownToHtml(data);
log.debug("processed: {}", processed);

Any help to deal this is appreciated.
Thanks!!!

@sunitapatro, I suggest you dump the data so that you can see what is returned. Then you should pre-screen this type of input to pegdown to prevent it from hanging. Please post the errant data so that pegdown can potentially be updated to prevent such hangs.

Thanks for responding.
Here is the 'data' input to pegDownProcessor.markdownToHtml(data)
urldata.txt

@sunitapatro, what I meant by data is not the markdown you expect to get but the actual HTML returned by the getStreamAsString() caused by the redirect to login.
Add code to log the received data from the get stream, before passing of it to pegdown, so that the cause of the hang can be debugged.
You should probably add code at the same point that will detect that the data coming back is not markdown but HTML and present it as is, without pegdown processing, so that when this happens there is some feedback to the user.

The data that is being returned by the getStreamAsString() is nothing but "urldata.txt"  which i shared earlier. Its a NEGATIVE test, actually getStreamAsString() was supposed to return .text file (with markdown syntax data) read from an URL, but since that URL needs authentication, so it returns the login.html page. So the urldata.txt is nothing but HTML content if you see.
In short, the urldata.txt (contains HTML) is the content input to PegDownProcessor.
I understand that its wrong content to PegDownProcessor, but then i was expecting PegDownProcessor to return either some exception or null or something like that. But reality is its hanging.

nothing but HTML content covers a universe of possibilities. It is impossible to guess what exactly is causing the problem in pegdown parser without having input that duplicates the problem. After all, pegdown is just another program, like yours, all debugging requires input to be able to narrow down where things go wrong.
Validating input is really limited to markdown and the handled HTML tags. Handling unadulterated HTML response from a server is outside of its intended application. I do agree that it should not hang, but without having a file which causes the hang I can't being to figure out what causes it.
It is up to the implementation specific code to make sure that what is fed into pegdown can at least be considered as markdown.

@vsch,
Please read the file urldata.txt content to Stream, convert to String and pass to PegDownProcessor and you will be able to reproduce PegDownProcessor hang.
urldata.txt

@vsch
Any update on this?

@sunitapatro, to save time, I opened the file in pegdown using my IntelliJ IDEA plugin (idea-multimarkdown) which uses pegdown as the parser, by renaming it to urldata.md and opening it in IDEA. I saw no issues and no hangs.
The problem occurs when you read the file as a stream and convert to string, it is not a pegdown issue but in the code before the pegdown call.
As a test I suggest before passing the string data to pegdown, convert it to a char[] which is what pegdown does via string.toCharArray() and then dump the char array as bytes to a file and examine what contents you are really passing to pegdown. The file you provided does not cause pegdown to hang, so the issue is somewhere else.

I find this problem too. The version is 1.6.0
final PegDownProcessor pegDownProcessor = new PegDownProcessor(Extensions.ALL_OPTIONALS | Extensions.ALL_WITH_OPTIONALS, 5000);
//markdownText is pure html
final RootNode node = pegDownProcessor.parseMarkdown(markdownText.toCharArray());

code like above, and it will stop the function exactly at parseMarkdown function
sorry for my poor English

it seems that the code drop into a never end loop

I solve the problem by add extra tags like “”+data+""
data is pure html witch contains many


Add Azure support

Because I don't have an OpenAI key, you may need to verify if this PR blocks the original OpenAI service before approving it.

I think it's a good attempt. maybe you can add voice function for it.


Strip trailing slash on dir path

Strip trailing slash to prevent fs.root.getDirectory in function dir from returning with a file not found error on Windows

I see I should have patched index.js. I will do that. Please wait for it before merging.

Done! Please merge! (and maybe rebuild)

I am not sure this is safe for other platforms. I'll test first before I'll merge.

Testing is always a good thing. I have been using a version with this patch for quite some time now without any problems so I'm not expecting any problems.

Yeah, I can confirm it works on Windows 10, iOS 8 & Android M.

Please fix this! I just lost 4 hours debugging this bug.
Solution is working. Thank you
Its 2 years already from starting this PR

No activity for over 5 years so I'm closing this.


fix clippy warnings

I've fixed all clippy warnings for our code base according to clippy's default configuration. Most of the changes are pretty mechanical. If something doesnt look right to you lets figure out which lints we should ignore and where to put #[allow] marks :)
This is a starting point to running clippy in the CI and adding it as a pre commit check similar to rustfmt
Command to run clippy: cargo clippy --all-targets --all-features --all --tests -- -D warnings

There is one warning left.
error: large size difference between variants
   --> zenith_utils/src/sock_split.rs:112:5
    |
112 | /     Tls {
113 | |         stream: BufStream,
114 | |         session: rustls::ServerSession,
115 | |     },
    | |_____^ this variant is 568 bytes
    |
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
note: and the second-largest variant is 40 bytes:
   --> zenith_utils/src/sock_split.rs:111:5
    |
111 |     Tcp(BufStream),
    |     ^^^^^^^^^^^^^^
help: consider boxing the large fields to reduce the total size of the enum
   --> zenith_utils/src/sock_split.rs:112:5
    |
112 | /     Tls {
113 | |         stream: BufStream,
114 | |         session: rustls::ServerSession,
115 | |     },
    | |_____^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant

error: aborting due to previous error

@patins what do you think about boxing in this case?
I think this can be merged in current state to stop the rebases and I'll submit another PR with CI handling


Issues with Heroku and Sidekiq-Status

I'm on

ruby 2.7.0
Rails <IP_ADDRESS>
Sidekiq 6.5.4
Sidekiq-Status 2.1.3
Heroku-18 stack

When I push WITHOUT Sidekiq Status all is well. (Literally just comment out the gem in my gemfile, and re-run bundle)
When I re-enable the gem and bundle Heroku fails with the following errors:
!     rake aborted!  !     NameError: uninitialized constant Sidekiq::Component  !     Did you mean?   Oh and locally everything is fine.
WOW, UPDATE:
Wow, I can't believe it, but it was my sidekiq version. I was on, as you can see, 6.5.4 and it was failing but only on Heroku.
This might be a great idea to put this in the docs or something. To keep folks from spending days on this issue.

Sounds like the issue was actually upstream in Sidekiq (which isn't unusual to see, sadly). Closing this out.


Release triggered workflows for registry operator

Which area/kind this issue is related to?

/area ci
/area registry
/area releng
Issue Description

Registry operator releases should produce built images on quay.io for use of the releases.
Guide to creating release workflows: https://birtony.medium.com/setting-up-automated-release-workflow-with-github-actions-628dbca2446e
Release Workflow Trigger Example
on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'

Acceptance Criteria

[ ] Create a workflow file that triggers on release cuts
[ ] Create tasks to build and push quay.io/devfile/registry-operator and quay.io/devfile/registry-operator-bundle on the release changes, use version label as tag
[ ] Perform integration testing on release images

I think this is a dupe of https://github.com/devfile/api/issues/1267?