text:
Support for nesting a schema within itself

If you define a Marshmallow object that has a field that references itself, you get an error.
Example:
class Node(marshmallow.Model):
    nodes = marshmallow.NestedModel(lambda: Node(exclude=("nodes",)))

Error:
site-packages/marshmallow_objects/models.py", line 86, in __init__
    super(NestedModel, self).__init__(nested.__schema_class__, **kwargs)
AttributeError: 'function' object has no attribute '__schema_class__'

Hi @nryang thank you, I will check what I can do to fix your issue.

Hi, unfortunately the way how it works in marshmallow doesn't work with marshmallow_objects.
Bu I solved this problem. With a #83 you can use a text name of a class to achieve a nesting schema within itself:
class Person(marshmallow.Model):
    name = marshmallow.fields.String()
    friend = marshmallow.NestedModel("Person")

Person.load({"name": "John Doe", "friend": {"name": "Jane Doe"}})

Released in 2.2.0: https://pypi.org/project/marshmallow-objects/2.2.0/

authors: SVilgelm nryang

repo: sv-tools/marshmallow-objects


text:
Support UPSs handled by APC

As someone whose computer is connected via USB to an external power supply, I would love to be able to monitor its status from within battop. However it doesn't appear in the sysfs and as such is invisible to this library. Being able to support more types of batteries and power supplies should be a worthy goal for this type of library, but I don't know how much effort it would take to implement.

Hey, @boomshroom!
I seriously doubt that this is the good idea, sorry. battery is nothing more than an abstraction over OS interfaces, and if target platform does not have the driver for your power supply, this crate is useless in that case.
Also, I do not want to commit myself to support all these various and rare devices for all supported platforms; that would be a hell of a burden.

I do have a driver in the form of apcupsd. I can access the statistics through apcaccess status. Unfortunately it doesn't seem to come with a library that can be linked to and needs the output to be parsed in order to be used, nor does it populate /sys/class/power_supply.

Oh, okay, I've probably misunderstood you.
As far as I see from manual, the only options to get data from the apcupsd without re-implementing it fully, is to run shell command apcaccess status or try to make the HTTP request to a daemon CGI interface (if it is even enabled).
I'm going to re-open that issue, but with a low priority, because ADP information is not supported at all right now and it should be done first.

source: gharchive/issue

authors: boomshroom svartalf

repo: svartalf/rust-battery

license_type: permissive

license_source: github-api


text:
Edit existing host

I'm can't edit the remote hosts as it is not in the drop down menu. I only have: Show Open Files, Browse Hosts, Add  New Host (sftp) & Add New Host (ftp). At one time I found the file with the hosts and edited it. Now I can't remember where the file is.

I've had the same issue but it's just a key stroke away.
From the Readme:

Keyboard shortcuts
Shift+e Edit hosts. Usable when selecting hosts (Browse).

Could it be better?  Yes!  But at least this should get you going for now.  :)

Remote Edit not loading & unusable.
Atom Version: 1.9.0-beta0
System: Microsoft Windows 7 Home Premium
Thrown From: remote-edit package, v1.8.24
Stack Trace
Failed to load the remote-edit package
Is there a fix for this in the near future?

repo: sveale/remote-edit

license: mit

license_source: bigquery


text:
Not an issue but a question

It is possible to view Github .md file and its contents with an App create?
Also do you please elaborate  on Web View? what kind of script is need?
You can close the issue afterwards; please

Sorry but I have absolutely no idea what you're on about.

Sorry iam talk about reading readme markdown from an app webview
What script is needed for webview app? Please do you posting a couple examples

repo: sveinbjornt/Platypus


text:
Testing strategy

One thing I was wondering is if there's a good way to test the adders. It would be interesting to think about as part of the big rewrite as I imagine testing could affect the actual adder code as well. E.g. if there's a modify_file utility that all adders call it could throw an exception if the base file is not as expected and then the test could see that the process failed to apply the adder. If we wanted to adder to just skip that file in the case of an error instead of failing then that exception could be thrown only if a flag is provided that the tests could use

Here's what I'm currently thinking without doing extra research:
I am in the process of setting up the framework for detectors, with postcss's being written already: https://github.com/svelte-add/svelte-add/blob/15ed8b50ac13c27ed6b6dec010486db67e2c1840/projects/svelte-add/adders/postcss/detect.js The original point of this is to prevent re-running a dependent adder, for example if someone adds postcss then adds tailwindcss, it should be detected that postcss was already run so it doesn't need to be run again before setting up tailwindcss. Additionally https://github.com/svelte-add/svelte-add/issues/25
Here's a consequence of that:

If all detectors pass, the integration is probably set up correctly (and to address https://github.com/svelte-add/svelte-add/issues/25 where it concerns the CLI, it should inform the user the adder won't run again)
If no detectors pass, it should be the case that adding the integration will then make all detectors pass
If some detectors pass, the integration is probably not going to function correctly (or the app as a whole probably won't as a consequence)

(The "probably"s and "should"s are why they're called heuristics).
We can reuse 2. in tests for each adder individually and for combinations of them. I am really not sure how it's going to be the case that we can make sure the test suite re-runs with every SvelteKit, SvelteKit initialization process, and SvelteKit dependency update, but we'll probably just manually check every few days / major update since I read all the SvelteKit issues / updates anyway.
This is also without even thinking of a test runner to use that would make it easy to do something like this. I've used Mocha in the past and not taken issue with it but since Svelte projects generally seem to use uvu I'll probably have to look into that too.
Somewhat relatedly, fortunately this is already set up as a monorepo so it'll be easy to contain everything within a projects/tests directory.
As for detecting malformed environments during the CLI process, there's a getEnvironment helper that runs before the adder process (and project initialization process for create-kit and create-vite once implemented) to get information and prevent basic mistakes like running an adder in an empty directory or non-Svelte-project directory or running a project initializer in a non-empty directory to address https://github.com/svelte-add/svelte-add/issues/20. The update* helpers are going to be designed to create missing files if needed (for example, I don't think a svelte.config.(c)js is created at all in the Vite-Svelte template without TypeScript).
Those are my disorganized thoughts.

I imagine SvelteKit releases or breaking changes at least will slow down substantially once 1.0 is released, so hopefully we don't need to worry too much about testing new releases
I personally prefer Mocha because there's a larger community using it and more documentation though uvu is faster. Either should work
One thing I wonder about detectors is that whatever modifies the template will probably need a lot of the same code as the detectors have, so hopefully it doesn't create too much duplication

This is implemented and will be further improved by #337

authors: babichjacob benmccann manuel3108

repo: svelte-add/svelte-add

license: MIT


text:
Add @sveltestrap/sveltestrap package

🎯 Changes
Adds the latest @sveltestrap/sveltestrap package under the new organization.
✅ Checklist

[x] I have given my PR a descriptive title
[x] I have run pnpm run lint locally on my changes

@lachlancollins updated

source: gharchive/pull-request


text:
data-sveltekit-keepfocus does not work on POST forms

UPDATE: As explained by @s3812497 - I was confused and missed the info in the dosc, that this only works for GET forms, this would be a feature request for POST forms then as well.
There were two tickets related to this: https://github.com/sveltejs/kit/issues/7895 and https://github.com/sveltejs/kit/pull/9019 with the actual implementation.
The documentation confirms that we should be able to use data-sveltekit-keepfocus on a <form> element not to loose focus after the form is being submitted.
This seem not to work for me. Nor for forms with use:enhance, neither for those without. I've created a simple reproduction code: https://stackblitz.com/edit/sveltejs-kit-template-default-du58bc?file=src%2Froutes%2F%2Bpage.svelte Either that, or I don't fully understand how should it work from the docs.
Reproduction

Create a POST form and make it use:enhance
Add data-sveltekit-keepfocus attribute to it
Submit the form on:input

or use https://stackblitz.com/edit/sveltejs-kit-template-default-du58bc?file=src%2Froutes%2F%2Bpage.svelte
Severity
serious, but I can work around it

I'll admit I've never used this option and was confused by the documentation. However, at the top of the page it does mention:

These options also apply to <form> elements with method="GET".

This could be made a bit clearer?

@s3812497 - that would make sense. I totally missed it.

or is there a good case for keeping focus for POST form submissions?

Sure there is. You don't really have to have a 'submit' button on input fields for some cases (like 'a note for the item'). So I want to save some data by POST but allow the user to keep focus while editing it. For accessibility you just display the buttons in .

I would also need this for a POST form using autosave. Whats your current workaround @z-x?

Hello, I've used a translator for this message, so please excuse any unintentional rudeness in my tone.
I am currently testing accessibility for both browsers with JavaScript disabled and regular browsers. My scenario involves designing a page similar to Twitter, which contains many posts. Specifically, I'm focusing on navigating to a certain "Like" button (for example, the 11th or 20th post's Like button) using tab navigation -> clicking the Like button with the space bar -> and then continuing to navigate downwards without losing focus, using the tab key.
From what I've read in the threads, it seems that the data-sveltekit-keepfocus attribute does not support posts. Considering the associated methods for forms, it appears designs are being made with browsers that have JavaScript disabled in mind. Would it be possible to consider my case as well?
Thank you for your attention to this matter.
my Code

action practice

// not work keepfocus
<form method="POST" data-sveltekit-keepfocus use:enhance >
	<button>{data.isLiked ? '❤' : '🖤' }LIKE</button>
</form>

{data.isLiked ? 'liked' : 'not liked'}

authors: XIYO rikardkling s3812497 z-x

repo: sveltejs/kit


text:
Change $layout.svelte to @layout.svelte and [param].svelte to {param}.svelte?

Ok hear me out.
I think we closed https://github.com/sveltejs/kit/issues/894 prematurely; it does make sense to use a character that doesn't require special handling, if possible. It's awkward to type src/routes/$layout.svelte on the command line — you get to the $ and either have to reach for the backslash, or curse your lack of forethought in not typing 'src (single quote only, no doubles!) instead of src.
Even if you don't find yourself typing/tab-completing route filenames on the command line frequently, you might find yourself attempting to cmd-click on the filename in your editor's integrated terminal (e.g. in the output from git diff or tsc or whatever) in order to edit the file. At least in VSCode, that doesn't work for filenames containing $layout, probably because something somewhere is replacing it with the layout environment variable.
These problems go away with @.
Related to the cmd-click problem: VSCode doesn't recognise this as a file — if you hover it, it will only highlight the file up to the [ character:

This, on the other hand...

...works perfectly:

I should note that this behaviour appears to be specific to VSCode; iTerm reverses the treatment of [bar] and {bar}. But I think it's probably more important that cmd-click works in integrated editor terminals, and VSCode is the most popular one of the bunch.
Aesthetically, @layout.svelte and @error.svelte seem fine, and I actually prefer {param} to [param], not least because it's more aligned with the syntax of Svelte itself.

It doesn't need to, since you don't have a reason to type $app/paths etc on the command line (and it wouldn't mean anything in that context anyway). But we could, I guess

Yeah there's no techical reason, more an alignment question

@GrygrFlzr points out that @ is a nuisance character in a lot of chat contexts (discord, github, twitter). Maybe +layout.svelte?

As a vscode user myself I think this change would be great and I'd avoid a considerate amount of URL copy/pasting around. I remember NextJS RFC about this but I don't think the {} option was proposed or discarded at any point.

Can someone remind me what is the downside of having layout.svelte without any prefix? Or why do we need to prefix the file in the first place?

Ha yes, Next and Nuxt explicitly based their dynamic parameter syntax on Sapper — I guess past me accidentally sabotaged them.
The prefix is there because xyz.svelte creates the /xyz route, but layout.svelte doesn't create the /layout route. You need some way to indicate that it's a 'special' file (simply saying 'layout and error are special names' doesn't work, because we might need to add to that list of names over time — as we did recently — and it would be a breaking change if we didn't have a prefix because someone might already be using the name we want to add). In Sapper that was done with the _ prefix, but that's also used for private modules/components, and suffers from the same problem of not being future-proof.

+ is somewhat less ergonomic on a QWERTY keyboard and requires finagling your right hand or the combination of left hand shift plus right hand =, versus the current $ being reachable by the left hand. This isn't a common use case if we only apply it to the files, but if we align $lib to +lib, that's a much more frequently-typed thing that would quite literally be more painful to type.
Also I think it +app/env looks funny, but that's hardly a strong argument.

Thanks for the clarification @Rich-Harris and I see your point. Looks like we have 2 "special" files (layout, error) that need to be excluded from route creation. It looks like we're saying that the overhead of adding new files to an exclusion list is greater than having a special character to signal this is a 'special' file but at the same time, any special files need to have some code changes associated that would handle those use-cases.
When you refer to a breaking change, is this in regards to SvelteKit, sapper or something else? If we're talking about SvelteKit this current stage might be the right time to have breaking changes (if there even a right time for that 😀)
Is it an option to have a new folder, something like kit (same level as lib) where all these special files would live, this way we'd avoid collisions and we would be able to keep the file name simple?

Some findings about the VS Code Ctrl+Click behavior on Windows:
src/routes/[dynamic]/[nested]/test.svelte goes to the folder
src/routes/[dynamic]/[nested]/test.svelte shows files inside the dynamic folder
src/routes/[dynamic]/[nested]/test.svelte goes to the file
src/routes/[dynamic]/[nested]/test.svelte does a search for test.svelte files if there's more than one
This works the same for {}.

I would lean to either # or ~ in that order as a replacement for $.

# has the same issue as @ in terms of being annoying on chat/social media platforms (channel names, hashtags), also I think Vite uses it internally so it might break? Not sure about potential issues with ~.

Ha yes, Next and Nuxt explicitly based their dynamic parameter syntax on Sapper — I guess past me accidentally sabotaged them.
The prefix is there because xyz.svelte creates the /xyz route, but layout.svelte doesn't create the /layout route. You need some way to indicate that it's a 'special' file (simply saying 'layout and error are special names' doesn't work, because we might need to add to that list of names over time — as we did recently — and it would be a breaking change if we didn't have a prefix because someone might already be using the name we want to add). In Sapper that was done with the _ prefix, but that's also used for private modules/components, and suffers from the same problem of not being future-proof.

Almost all the other solutions mentioned above give me the gut feeling that things won't work elsewhere. I think using _ for layout/error and - for private routes makes the most sense. _ and - are almost always allowed on files and in the average command line because _ often gets used as a alphabetic sorting hack and - as a alternative to a space  .

@Rich-Harris yeah I agree, while I was typing I got to the same conclusion.
So ATM it looks like we have a few options (@, _, $, +) for file special file prefixing, what are the criteria that we'd use to decide the best option?

For dynamic parameters, it seems that the only plausible characters that don't behave differently between VSCode and iTerm (iTerm makes filenames with [] and () interactive but VSCode doesn't; VSCode makes filenames with {} and <> interactive but iTerm doesn't) are pipes:
src/routes/|dynamic|/|nested|/test.svelte

That becomes interactive (i.e. cmd-clickable) in iTerm and VSCode; I can't guarantee the same is true everywhere, but it seems like the surest bet.
I still think @ is the best option for layout/error files. In github/discord it's very easy to wrap in backticks, and I'm not too concerned about the twitter case. There is good precedent for its use in scoped packages (though incidentally, this is a reason not to use it for @app/* etc, but rather to keep those as $).

\ / : * ? " < > | are all disallowed characters in filenames on Windows.

windows: pissing in the punchbowl since 1985

ok, new proposal!
src/routes/%dynamic%/%nested%/index.svelte

Works without backticks, interactive in both iTerm and VSCode, allowed in windows

One more.
src/routes/~dynamic~/~nested~/index.svelte
src/routes/~dynamic~/~nested~/~layout.svelte

Tilde has a nice calming wavy effect. Ergonomically easy to reach.

Update:
src/routes/~dynamic/~nested/index.svelte
src/routes/~dynamic/~nested/~layout.svelte

Just start the param w/ it. Even easier.

With the latter variant, layout, error, and any future files we want to implement becomes a special reserved keyword.

@GrygrFlzr yeah, I immediately realized, and deleted my comment—which is why you're yelling into the void.

Here's an argument for % that I think is solid: you can't use it in a URL pathname (unless it's followed by characters that are being %-encoded). The other characters we've been discussing don't have that property (source). ([] is also safe on that basis, incidentally.) If we used ~ or =, for example, it would make it harder to use them as literals.
We can also reduce the ugliness by 50%, by having %param.svelte instead of %param%.svelte. (We'd need to use both in more complex cases like %param%-foo.svelte or %param%-%bar%.svelte, but those are very much the minority.)

One major downside to % — Vite barfs on it:

If you change the import to be URL-encoded, you get this:

Haven't delved into it too much yet but I think this is a bug in Vite — I suspect it should be encoding import URLs when it transforms modules

Yeah, I think this is something that Vite could address. It's totally fine to have modules with % in the filename:

I'm indifferent about changing prefixes for stuff like layout files, but I for sure don't like trading [] or {} for another pair of characters. The 80% use case is reading the file names or creating them, not clicking on the file names in some terminal that doesn't know how to read it. So it feels totally wrong for me to optimize for the 20% use case and trade the readability and convention (Sapper, Next etc use []) for something that happens to work on VS Code.

@dummdidumm I'm coming around to this opinion.

Have we discarded the underscore (_) option?
src/routes/_dynamic_/_nested_/index.svelte // dynamic path, non-dynamic file
src/routes/_dynamic_/_nested_/file_name.svelte // dynamic path, non-dynamic file
src/routes/_dynamic_/_nested_/file-name.svelte // dynamic path, non-dynamic file
src/routes/_dynamic_/_nested_/_name_.svelte  // dynamic path, dynamic file
src/routes/_dynamic_/_nested_/_var1___var2_.svelte // dynamic path, dynamic file
src/routes/_dynamic_/_nested_/_var1_-_var2_.svelte  // dynamic path, dynamic file
src/routes/_dynamic_/_nested_/_private.svelte  // dynamic path, non-dynamic and private file
src/routes/_dynamic_/_nested_/@layout.svelte // dynamic path, reserved file

_ is a safe character so no encoding required and it seems to work fine vscode/term/browser(devtools)

I do like how expressive [ ] and { } are but at the same time not being able to click-through files and I need to manually find the file causes some frustration. The fact that I need to manually find/goto file it slows down the flow and doesn't feel like a great developer experience (not saying is bad, but not great).
I'm not saying we should change this convention, but if it slightly improves the development experience for everyone, wouldn't we want that @dummdidumm ?

_ already has meaning (private modules/components), so either we have to find a new solution for that, or we can't use it for this

I've added an example that covers that:
src/routes/_dynamic_/_nested_/_private.svelte  // dynamic path, non-dynamic and private file
dynamic routing is wrapped by _ while private is prefixed. Do you reckon this wouldn't be feasible?

feasible, but deeply confusing

Honestly, I'm leaning more toward this being a "bug" with IDEs / terminals that provide clickable links. I no longer favor ~ tilde.

How about using . for private modules/components and _ for layouts / errors?

. files are sometimes entirely hidden in .gitignore
node_modules
.*
# etc.

. files are sometimes entirely hidden in .gitignore
node_modules
.*
# etc.

Any freshly created nuxt project always came with an preconfigured .gitignore based on your projects configuration. SvelteKit could offer a preconfigured .gitignore when creating a fresh svelte project too. If we add all the major . prefixed files that people generally try to target with .* we may be on to something.

afraid that's a non-starter

What about using * for those files? like src/*layout.svelte, will it work with vscode and iTerm?

What about using * for those files? like src/routes/*layout.svelte, will it work with vscode and iTerm?

https://github.com/sveltejs/kit/issues/1149#issuecomment-823319922

missed that

Here's an issue for the VS Code bug where I posted some details showing the line number where the bug is in case anyone wants to try fixing VS Code instead of changing SvelteKit: https://github.com/microsoft/vscode/issues/118687

^ would be another option. = as well
.I still don't think that _ should be out of the running. I'm not sure why it's an issues that it's used for private modules. We don't want _layout.svelte or _error.svelte to be routable so it seems in keeping with the private aspect of it

It's an issue because if we later want to add _foo.svelte with some other special meaning, it's a breaking change because anyone could have already been using it with no special meaning as a component they can import from other pages, and upgrading would then likely break their apps.

Core team has been bikeshedding this, and we think the best option is to use two underscores for special files:

__layout.svelte
__layout.reset.svelte
__error.svelte
_private.js

We don't like any of the alternatives to [params], so we're just going to cross our fingers and hope for a VSCode fix

We need to make sure to change this for the manifest files:
https://github.com/sveltejs/kit/blob/3b21b7e558e33885f40b7e09befb4c6c3d86b958/packages/kit/src/core/dev/index.js#L58-L63

authors: Conduitry GrygrFlzr Rich-Harris UltraCakeBakery arxpoetica benmccann dummdidumm ivoreis tretapey


text:
Page store update bug with svelte 5

Describe the bug
I'm not sure if this is a Svelte5 bug or a Svelte5 specific Sveltekit bug.
But I was not able to reproduce it in the Svelte5 repl.
Reproduction
Svelte 5 (Same example with Svelte 4 is working)
Click the "Toggle" Button.
The slotted content changes from +error.svelte to +page.svelte correctly, but the 3 lines above the button stay the same.
In the console, you can see something like: update {something: true, somethingShouldBe: false}
something is a derived state from $page.status === 401 || $page.url.pathname === '/test' while somethingShouldBe is the exact same condition but inlined in the $inspect rune.
Strange thing is, if you change throw401 to initially be true in routes/+page.server.js, it works correctly.
Or when you change all $page.status === 401 || $page.url.pathname === '/test' conditions to $page.status === 401 in routes/+layout.svelte, it works correctly as well.
Logs
No response
System Info
Svelte5
Sveltekit 1.30.3 & Sveltekit 2.*

Severity
blocking an upgrade
Additional Information
No response

I was able to reproduce it with Svelte 5

Is this still an issue for you? I'm experiencing something similar testing out Svelte 5 with a SvelteKit project. When Subscribing to the built-in Page, Error, or Navigating stores, I get their initial state in the subscribe callback, but never any subsequent updates - e.g., using the auto-subscription syntax to get the current $page.url.pathname just returns the pathname from the initially-loaded route and never updates.

authors: PatrickG kiosion


text:
Allow some script output without router + hydration

Describe the problem
For a simple blog where each page is SSR'd and there's no need for the router or hydration, turning both off also disables any per-component scripts - extra effects that toggle menus for instance.
Right now I have to enable hydration, which then repeats all the serialized JSON of the content even though it isn't used OR I have to switch to using some other JS lib such as alpine or custom JS to add menu toggles, which feels wrong when I'm already using the best JS framework there is.
Describe the proposed solution
I would like the hydrate: false option to just turn off the JSON serialization and re-hydration parts, without also removing the regular svelte scripts. I understand the onus is then on me not to use something
Alternatives considered
Writing JS manually as static content
Importance
nice to have
Additional Information
No response

Hydration in SvelteKit is currently all-or-nothing — there's no way to attach event handlers that toggle menus without hydrating the app, and you can't hydrate the app without the page's data. In the longer term we'd like to improve the story around hydration (making it faster, non-blocking, and maybe partial) but for now I'm afraid this isn't possible.

authors: CaptainCodeman Rich-Harris


text:
[vite-plugin-svelte-kit] Prerendering failed with code 1        error during build:

Describe the bug
[vite-plugin-svelte-kit] Prerendering failed with code 1
error during build:
Error: Prerendering failed with code 1
at ChildProcess. (file:///C:/Users/y1981/OneDrive/Desktop/Coding/sveltekit/lista-anapu/anapu-app/node_modules/@sveltejs/kit/dist/vite.js:2447:14)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
vite.config.js
import { sveltekit } from '@sveltejs/kit/vite';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()]
};
export default config;
vite.js (where the error is pointed in child by vscode) :
child.on('exit', (code) => {
if (code) {
reject(new Error(Prerendering failed with code ${code}));    // the line pointed by vscode error
} else {
prerendered = JSON.parse(fs$1.readFileSync(results_path, 'utf8'), (key, value) => {
if (key === 'pages' || key === 'assets' || key === 'redirects') {
return new Map(value);
}
return value;
});
fulfil(undefined);
}
});
Reproduction
Error: Prerendering failed with code 1
at ChildProcess. (file:///C:/Users/y1981/OneDrive/Desktop/Coding/sveltekit/lista-anapu/anapu-app/node_modules/@sveltejs/kit/dist/vite.js:2447:14)
at ChildProcess.emit (node:events:527:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Logs
No response
System Info
windows 10 updated, node and npm updated last version, node LTS last version, windows and vscode updated last version

Severity
annoyance
Additional Information
I am testing the sveltekit , my clients begun call me because another week offline, I need help, is my first time with a js framework, but I'm trying searching alone for answers but now is vite issues , my lib folder seems not to work using $ and I have to point the folders in the old ways ...

As indicated in the issue template, you need to provide a minimal reproduction - either as a link to a repo or a link to a StackBlitz project - or this issue will closed.

The first time I asked for help here, if I messed up, please forgive me and show me the right way to do it, my clients is getting angry because the app is offline and I really loved sveltekit but I need to put at least the test working, is my first time with a framework, I almost tried vue but only sveltekit I enjoyed, because I work with vanilla html vanilla css and vanilla js ... Sorry If I ask for help in the wrong way I am here to learn and do it in the right way next time :)

The first time I asked for help here, if I messed up, please forgive me and show me the right way to do it, my clients is getting angry because the app is offline and

I understand ... Seems to be happening with a lot of people but in different ways

I'll try to get help with the guys from sveltekit in discord , or I'll have to back to normal way to make the app and forget about sveltekit for a while until 1.0 get ready

authors: Conduitry tomaz-on


text:
node.component... isn't a function

Describe the bug
Occasionally I will get a node.component isn't a function error, I first found it when I had a layout group without a +layout.svelte but then later came across when I deployed a large project to netlify (haven't found the cause for that yet)
Reproduction
Not been able to reliably reproduce yet, hoping this issue will provide visibility to others with the problem
Logs
No response
System Info
System:
    OS: Linux 5.19 undefined
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 3.11 GB / 15.55 GB
    Container: Yes
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.19.1 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Brave Browser: 105.1.43.89
    Chromium: 105.0.5195.125
    Firefox: 104.0.2
  npmPackages:
    @sveltejs/adapter-auto: 1.0.0-next.80 => 1.0.0-next.80
    @sveltejs/kit: 1.0.0-next.504 => 1.0.0-next.504
    svelte: ^3.50.1 => 3.50.1
    vite: ^3.1.4 => 3.1.4

Severity
blocking an upgrade
Additional Information
No response

Have same problem, create nested +layout[.server].js without nested +layout.svelte and error is thrown: node.component is not a function.

There seems to be an error on the file https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/server/page/render.js#L31, line 31:
export async function render_response({
	branch,
	fetched,
	options,
	state,
	page_config,
	status,
	error = null,
	event,
	resolve_opts,
	action_result
}) {
// ...
}

branch is always value of [], injected from here: https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/server/index.js#L213
			if (state.prerendering?.fallback) {
				return await render_response({
					event,
					options,
					state,
					page_config: { ssr: false, csr: true },
					status: 200,
					error: null,
					branch: [],
					fetched: [],
					resolve_opts
				});
			}

SInce noone came up with a reproduction that isn't traceable back to a missing +layout.svelte, I'm closing this as a duplicate of #5967

authors: BiscuiTech asv7c2 dummdidumm ghostdevv


text:
use ** in auto routing

Describe the problem
I'm always frustrated when i want to do modular routing. For example in vuejs :

Because i have to add all routes in my svelte.config.js
Describe the proposed solution
I would like svelte kit to auto generate routing with ** like this for example : src/**/pages
Alternatives considered
No response
Importance
would make my life easier
Additional Information
I am currently working on svelte/kit routing to add the feature. Can i do the it and create a mr ?
Thanks in advance :)

i want something like this :
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	preprocess: vitePreprocess(),
	kit: {
		adapter: adapter(),
		files: {
			routes: 'src/**/routes'
		}
	},
};

export default config;

I want something like this :

I want pages (routes) inside my modules. Inmy modules i can have other modules or components for example. Sorry it was disappointing to change the code, the function is so loooooong lol. I just need to finish the test and i will be done with the coe inside svelte/kit.

I still don't fully understand. Do you mean that you want to skip src/routes as the root for all routes and instead place all routes inside src directly?

Yes. And i want to have a pattern for auto generated routes in modules using routes.

I don't understand what you mean by "pattern for auto generated routes" - what is meant by "auto generated"? Do you have a code generator somewhere that populates your folders?

It sounds like the request is to let routes be created by things matching a given glob, rather than them being created from all stuff within a given folder. If that's what the request is, it doesn't sound like a good feature to me.

Yes Conduitry. "It sounds like the request is to let routes be created by things matching a given glob, rather than them being created from all stuff within a given folder".
" If that's what the request is, it doesn't sound like a good feature to me." : Could you please develop that?

The rules inside the route directly are: Everything with a + in front is a special file to SvelteKit, and folder path ~= url. We think it's important to not deviate from these rules between projects so switching between them you'll feel right at home. Since the rule is "everything with a + in front is a special file to SvelteKit" you can still colocate all your other stuff (graphql folder, components folder etc) in there, you just can't create a pages directory. What you can do though is use the grouping feature and instead if pages you just do (pages) and you'll get your desired folder structure. Read more about it here: https://kit.svelte.dev/docs/advanced-routing#advanced-layouts-group
Closing since your request can be solved with existing API.

The rules inside the route directly are: Everything with a + in front is a special file to SvelteKit, and folder path ~= url. We think it's important to not deviate from these rules between projects so switching between them you'll feel right at home. Since the rule is "everything with a + in front is a special file to SvelteKit" you can still colocate all your other stuff (graphql folder, components folder etc) in there, you just can't create a pages directory. What you can do though is use the grouping feature and instead if pages you just do (pages) and you'll get your desired folder structure. Read more about it here: https://kit.svelte.dev/docs/advanced-routing#advanced-layouts-group
Closing since your request can be solved with existing API.

You right, i should not name "pages" but what if i want to have a folder routes inside all of my modules ?

authors: Conduitry MatthiasChometon dummdidumm


text:
IP not working as URL Path

Hi,
Thanks for the work, I got the server up and running locally, was able to push my packages into it. So far so good. But when I try to access the server through the machines IP (e.G. 192.168.2.XX) I can not reach the server:
Bad Request - Invalid Hostname

HTTP Error 400. The request hostname is invalid.

I tried starting the tool as Administrator as well. Same result. Not sure if thats an Issue, or I just can't find the proper setting, I am not very familar with running web services. Where can I configure that, if possible?
Tobi

Hi @TobiasGlaubach,
I've just tried to replicate this issue and all appears to be working for me. Can you confirm you've set the binding appropriately. <binding protocol="http" bindingInformation=":8080:192.168.2.XX" /> where XX is your IP?
Can you also provide any steps you've taken eg. Folder Permissions, Changed location etc.
Cheers,
Luke

I had that set before, and it didn't work back then. To be sure I tested again. Turns out it works from the local machine, but any other PC in the network can't access it (I can remotedesktop to the machine though). It might be related to our Network. Let me check that first.

OK I finally got a reply from our Network and VM Admin. Our system does not seem to be the issue.
I here is all the test cases I ran:
Running exe with <binding protocol="http" bindingInformation=":5000:192.168.2.24" />:
--> locally (through http://192.168.2.24:5000/): OK
--> network (through http://192.168.2.24:5000/): no connection

Running exe with <binding protocol="http" bindingInformation=":5001:192.168.2.24" />:
--> locally (through http://192.168.2.24:5001/): OK
--> network (through http://192.168.2.24:5001/): no connection

Running exe with <binding protocol="http" bindingInformation=":8080:192.168.2.24" />:
--> locally (through http://192.168.2.24:8080/): OK
--> network (through http://192.168.2.24:8080/): no connection

Running exe with <binding protocol="http" bindingInformation=":5000:0.0.0.0" />:
--> startup error: Failed to register URL "http://0.0.0.0:5000/" for site "NuGetServer" application "/". Error description: Die Anforderung wird nicht unterst³tzt. (0x80070032)
HostRunnerOnExited

Running Minimalist python flask server as a system test on the same machine:
python -m flask run --host=0.0.0.0 --port=8080
--> locally (through http://192.168.2.24:8080/) : OK
--> network (through http://192.168.2.24:8080/) : OK

python -m flask run --host=0.0.0.0 --port=5000
--> locally  (through http://192.168.2.24:5000/): OK
--> network  (through http://192.168.2.24:5000/): OK

python -m flask run --host=192.168.2.24 --port=5000
--> locally  (through http://192.168.2.24:5000/): OK
--> network  (through http://192.168.2.24:5000/): OK

Installation path: C:\nuget-server\SvenkleNuGetServer
EXE path: C:\nuget-server\SvenkleNuGetServer\Svenkle.NuGetServer.Service.exe
User running the EXE is Admin

I have faced the same problem, this is what worked for me:
Setting HTTP protocol binding in applicationhost.config to
<binding protocol="http" bindingInformation="*:8010:192.168.1.102" />
Adding netsh rule via cmd
netsh http add urlacl url=http://192.168.1.102:8010 user=Everyone
I hope it helps.

authors: Filipsi TobiasGlaubach svenkle

repo: svenkle/nuget-server


text:
[Bug] SVG Arcs path with continuous parameters '00' leads to error

Arcs need to use lots of parameters, if the two continuous parameters are 0, some authors will combine them.  It will lead to the svgo judge that there is insufficient parameter and return to NaN, for example the fork button of the github.

// the correct parameter array should be
arr = ['1.993', '1.993', '0', '0', '0', '-1', '3.72'];
// but according to svgo judgment, the following parameters are returned
arrSvgo = ['1.993', '1.993', '0', '0', '-1', '3.72'];

My solution is changing the regular expression to
S = /[-+]?(?:\d*\.\d+|\d+\.?)([eE][-+]?\d+)?/g;
newS = /0(?!\.)|[-+]?(?:\d*\.\d+|\d+\.?)([eE][-+]?\d+)?/g;

input
<svg
  class="octicon octicon-repo-forked v-align-text-bottom"
  viewBox="0 0 10 16"
  version="1.1"
  width="10"
  height="16"
  aria-hidden="true"
>
  <path
    fill-rule="evenodd"
    d="M8 1a1.993 1.993 0 00-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 002 1a1.993 1.993 0 00-1 3.72V6.5l3 3v1.78A1.993 1.993 0 005 15a1.993 1.993 0 001-3.72V9.5l3-3V4.72A1.993 1.993 0 008 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"
  ></path>
</svg>

output
<svg
  class="octicon octicon-repo-forked v-align-text-bottom"
  viewBox="0 0 10 16"
  width="10"
  height="16"
  aria-hidden="true"
>
  <path
    fill-rule="evenodd"
    d="M8 1a1.993 1.993 0 0-1 3.72 NaNvNaNL.28 NaN 3 NaNvNaNa1.993 1.993 0 2 1 NaN NaN 1.993 1.993 0 0-1 NaN NaNvNaNlNaN NaNvNaNa1.993 1.993 0 5 15 NaN NaN 1.993 1.993 0 1-3.72 NaN NaNvNaNlNaN NaNvNaNa1.993 1.993 0 8 1 NaN NaNzM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"
  />
</svg>

Do you have an actual version? It was handled in SVGO v1.1.0 released a year ago.

oh thanks, i will update the svgo.

authors: Despair-lj GreLI

repo: svg/svgo


text:
Add a .svgoignore file to folder

Is your feature request related to a problem? Please describe.
By whatever reason, I might want to skip some directories within my project.
Describe the solution you'd like
Ideally, this could be done by adding a simple .svgoignore file, similar to .gitignore.
Describe alternatives you've considered
1 - Adding the .svgoignore in a folder would make it skippable.
2 - Adding a generic .svgoignore in the root and specifying skippable paths.

There is --exclude flag added in https://github.com/svg/svgo/releases/tag/v2.3.0 to exclude files by regexp. Can it fit your needs?

I was looking more for something not command-line specified. So at the time I simply run svgo -r . which is what I intend for the large codebase, but different components will use certain SVGs and it is rare but possible that I want to ignore its component/assets/ where the SVGs could be contained for that component.
A simple way would be to create like a component/assets/.svgoignore and svgo would skip the analysis.

If you point me to relevant code that recursively analysis folders, I think I could open a PR with the feature, by simply checking if the directory contains a .svgoignore file or something.

I would prefer to add something like ignore field to svgo.config.js.

But then there would be an exhaustive list of paths to svgs to ignore as well. It is still better than the current command-line exclude tho. If what I say is not possible, then that seems a reasonable solution too!

authors: TrySound joao-conde


text:
How to draw curves?

Thanks for writing such useful library. I'm looking for some library for my image labeling tool imglab. So I've some questions;

Can this library help me to draw quadratic and bezier curves?
Can I draw with given points?
Can I manipulate shapes once the are drawn?

No this library cannot draw paths. This needs yet to be added
I am not sure what you mean. You can place points of a polygon by hand but beside that...
You need svg.resize.js for this job

Thanks for your response.

authors: Fuzzyma amitguptagwl


text:
SaaS launches

https://headlime.io/ https://www.indiehackers.com/post/how-i-earned-16k-in-48-hours-with-my-saas-launch-detailed-breakdown-578ad8f767

repo: sw-yx/launch-cheatsheet


text:
PAINT_002 Draw a point

Acceptance Criteria:
-) Create points when tapped on canvas
Description:
As a user I want to draw a point at the position of my finger on the painting area (white area on the screen).

Finished feature


text:
3.0 Annotations need javadoc

Some of the new 3.0 annotations have javadocs (class level and method level), but a lot of them are missing information, which makes it hard for new users to understand.

It would also be helpful if each of the annotations had examples on how to use them so users can have a better understanding of their purpose

authors: arthurdm janamanoharan

repo: swagger-api/swagger-core


text:
Support the JsonValue annotation

Currently the very useful @JsonValue annotation isn't supported by swagger-core. Schemas generated by swagger core will not be correct for the output of serializing models making use of this annotation.
https://fasterxml.github.io/jackson-annotations/javadoc/2.0.0/com/fasterxml/jackson/annotation/JsonValue.html
"Marker annotation similar to XmlValue that indicates that results of the annotated "getter" method (which means signature must be that of getters; non-void return type, no args) is to be used as the single value to serialize for the instance. Usually value will be of a simple scalar type (String or Number), but it can be any serializable type (Collection, Map or Bean). "
e.g. if you have these classes
public class A {
    public B b = B();
}
public class B {
    @JsonValue
    public string getValue() {
        return "value";
    }
}

A would not marshal to {"b": {"value":"value"}} but just to {"b":"value"}.
This PR attempts to add support for @JsonValue to swagger-core 2.x. It would be difficult to add to 1.x without a certain amount of refactoring due to the difference between Property and Model.

closing as support introduced elsewhere

authors: frantuma liam-jackson-hpe


text:
Fix for #847. Implemented findSubtypes.

Since the method findSubtypes was not implemented after jackson-swagger-module had been moved to the  swagger-core, ModelConverter could not find subtypes of passed class. Fixed it. Added unit-test.

Related to #847.

Looks like this snippet:
+    final JsonSubTypes jst = a.getAnnotation(JsonSubTypes.class);
+    if (jst != null) {
+      final JsonSubTypes.Type[] subTypes = jst.value();
+      final List<NamedType> names = new ArrayList<NamedType>(subTypes.length);
+      for (JsonSubTypes.Type subType : subTypes) {
+        names.add(new NamedType(subType.value()));
+      }
+      if (!names.isEmpty()) {
+        return names;
+      }
+ }

duplicates FasterXML internals.
Deep inside we have instance of the com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair class:
    @Override
    public List<NamedType> findSubtypes(Annotated a)
    {
        List<NamedType> types1 = _primary.findSubtypes( a );
        List<NamedType> types2 = _secondary.findSubtypes( a );
        if (types1 == null || types1.isEmpty()) return types2;
        if (types2 == null || types2.isEmpty()) return types1;
        ArrayList<NamedType> result = new ArrayList<NamedType>(types1.size() + types2.size());
        result.addAll(types1);
        result.addAll(types2);
        return result;
    }

where _primary holds our SwaggerAnnotationIntrospector and _secondary holds some internal class that handles JSON annotations.
At least as we can see from our CompositionTest.scala JSON annotations are already supported.

The last fix considers Alexey's remark above: JsonSubTypes processing is re-used from JacksonAnnotationIntrospector.

authors: MichaelDoumin tomtit webron


text:
Проверить возможность быстрой конвертации в приложение на мобилы

ресерч, сколько  будет стоить сделать приложение (которое пройдет в сторы). делает @Eljoy

это быстро, мы делали за пару вечеров приложение для радио (нативное)

Если главная цель переиспользовать большую часть наработанной логики то лучшим решением будет использовать React Native. SounCloud утверждают, что их команда разработчиков, смогла переиспользовать 85 процентов кода при написании мобильного приложения, используя ReactNative.
Вещи, которые придется изменить:

Верстка. React Native использует  Yoga layout для позиционирования элементов и стилей. Никакого CSS. Подробнее. Так что всю верстку элементов придется переписать. Плюс в том, что yoga использует в основе flexbox, который используется в swap.react, что упростит переписывание.

Ряд методов, которые недоступны в React Native. Например localStorage придется заменить на AsyncStorage. А все анимации реализуются, используя Animated API.

Дизайн. Его нужно адаптировать под малые экраны. С другой стороны, возможно для каждой из платформ стоит сделать его вид более нативным. То есть так, чтобы приложение соответствовало гайдлайнам Apple / Google соответственно (не обязательно).

Что будет круто настроить:

React-over-the-air-updates позволит обновлять js часть приложения минуя стандартную процедуру рассмотрения изменения Google/Apple.

С учетом закона Мерфи, моя оценка трудозатрат: 30-40 часов.
Интересные ссылки:

NativeBase качественный ui framework для ReactNative
Инструкция как настроить Ethereum JS API для ReactNative.
Список приложений, которые используют ReactNative.

Проверил библиотеку bitcoinjs-lib. Работает. Вернее не сама она, а ее форк react-native-bitcoinjs-lib.  Проверяю web3 и ipfs pub sub

Проверил web3, удалось подключить согласно инструкции.
Проверяю ipfs pub sub

Мне удалось запустить ipfs js внутри React Native используя nodejs-mobile.
То есть обращение к либе ipfs происходит не напрямую, а через мост в асинхронном режиме, который связывает React Native код и NodeJS код.
Подводя итог: получилось запустить все три испытуемые библиотеки с некоторыми особенностями, которые указал в этом треде выше.
В итоге, чтобы запустить swap.core/swap.react на мобильные платформы используя React Native, необходимо будет сделать, что то вроде react-native-swap.core, react-native-swap.react, где будут внесены изменения в работе касательно этих библиотек и другого функционала, который нельзя использовать напрямую в окружении React Native.

Касательно WebView решений, таких как Apache Cordova / PhoneGap.
Новость, что Apple планирует удалять гибридные приложения, использующие WebView, оказалось уткой.
Вот примеры гибридных приложений, использующих WebView и допущенных в сторы. С другой стороны, Apple может не пустить в стор приложения, которые являются чистыми портами веб сайтов.

2.12 Apps that are not very useful, are simply web sites bundled as apps, or do not provide any lasting entertainment value may be rejected

Подробнее тут.
Проблемы таких решений:

Производительность: приложения, использующие WebView кажутся тормознутыми, задержка отклика на действия заметна. Судя по отзывам к опубликованным приложениям они падают довольно часто.

Различие между движками WebView на андроиде и IoS.

The JavaScript code included in our Hybrid app runs in a WebView, which is essentially a native browser bundled with app. On Android, our code runs in a modern Chromium-based WebView that for the most part works exactly as it should. On iOS, we have the choice of running our code in one of two WebViews: UIWebView or WKWebView.

Подробнее, вместе с тем, к чему это приводит можно прочитать тут.

Google начнет блокировать OAuth requests, исполняемые из WebView. Это может коснуться и  Firebase Cloud Messaging. Вряд ли это приговор, но головной боли может добавить. Подробнее.

Непонятная ситуация насчет ipfs. Runtime Support: Cordova #834

Лично я бы использовал React Native, из за производительности, большей прозрачности насчет допуска в сторы и комьюнити. Там все равно большую часть уже написанного кода можно будет переиспользовать.

authors: Eljoy caffeinum noxonsu


text:
добавить фейсбук превью на главную

https://i.imgur.com/z3Ezvla.png сейчас вообще ничего нет. нужна какая то картинка привлекающая

@noxonsu Сейчас на всех страницах в opengraph:image выводится логотип

https://wiki.swap.online/wp-content/uploads/2018/04/logo-1.png

Потом надо будет подобрать хороший вариант и поменять

Facebook @noxonsu

authors: indapublic noxonsu


text:
Unclear documentation on anchors

The documentation of the layer-shell protocol states:
<request name="set_anchor">
  <description summary="configures the anchor point of the surface">
    Requests that the compositor anchor the surface to the specified edges
    and corners. If two orthogonal edges are specified (e.g. 'top' and
    'left'), then the anchor point will be the intersection of the edges
    (e.g. the top left corner of the output); otherwise the anchor point
    will be centered on that edge, or in the center if none is specified.

    Anchor is double-buffered, see wl_surface.commit.
  </description>
  <arg name="anchor" type="uint" enum="anchor"/>
</request>

It isn't mentioned that two opposing anchors are not allowed, but when trying
that the window doesn't get accepted. So maybe mention something about that in
the documentation? I would suggest adding something like this:

If two opposing edges are specified it will result in undefined
behaviour.

Two opposite edges center the surface on that axis.

Well, then consider this a bug report agains sway 1.6.1-rc2 (doesn't seem to be fixed in rc3 from the changelog). The behaviour in 1.6.1-rc2 is different from what I mentioned above (that was 1.5.1).
Namely left-right results in left alignment and top-bottom results in top alignment.

authors: emersion fwSmit

repo: swaywm/wlroots


text:
Next.js Chart.js broken when swcMinify enabled for non-development builds

Describe the bug
This bug was originally filed here where more details can be found. The issue has been narrowed down to seemingly broken output from swc.
https://github.com/chartjs/Chart.js/issues/10673
https://github.com/reactchartjs/react-chartjs-2/issues/1071
With NextJS, the library works well on development. But an error is thrown after running the app after building it.
RangeError: minimumFractionDigits is out of range.
If the next.js config is changed to swcMinify: false and a production build is done the issue goes away.
It seems that during production this line:
https://github.com/chartjs/Chart.js/blob/d4e106cc9cf19a273e5485ffaf6158f663e65717/src/helpers/helpers.intl.js#L4
The minimumFractionDigits and maximumFractionDigits in the options become NaN instead of 0.
There is sample code here created by the original filer of the bug:
https://github.com/LouisJackson/react-chart-test/blob/main/next.config.js
Input code
No response
Config
No response
Playground link
https://github.com/LouisJackson/react-chart-test/blob/main/next.config.js
Expected behavior
React should not die when a page with the Chart compiled with swc is accessed.
Actual behavior
No response
Version
"dependencies": {     "chart.js": "^3.9.1",     "next": "12.3.0",     "react": "18.2.0",     "react-chartjs-2": "^4.3.1",     "react-dom": "18.2.0"   },
Additional context
No response

Would like to add that this started happening to me from version 12.3.

Can confirm that the last release of Next where this issue doesn't occur is 12.2.5.
Breaking change must have happened between that and 12.3.

authors: alexphl grempe siinghd

repo: swc-project/swc


text:
ModuleItem node type imperfect some types are missing

Describe the feature
when i use swc.parse(code,{ syntax: 'typescript', tsx: true }) get ast but node type lack such asJSXExpressionContainer | JSXText and so on
Babel plugin or link to the feature description
No response
Additional context
No response

JS plugin is deprecated, and the core team does not want to encourage usage of it.


text:
fix(ecma-transforms-optimization) correct arguments typos

Description:
arguemnts -> arguments
arguements -> arguments

BREAKING CHANGE:

Related issue (if exists):

I'm sorry but we don't accept PRs like this


text:
Revert "updated cart to reflect total qty and teas"

Reverts swe-thinhnguyen1701/TeaLicious#74

good job!


text:
Reduce upload memory usage [DEVINFRA-609]

To have parity with the aws tool we currently upload files in 8MiB
chunks, which allows syncs to work consistently between both tools.
However, currently, this causes a large amount of memory use as reads
are read into 8MiB buffers and with a high amount of upload tasks, this
causes large amounts of data to sit waiting in memory to be uploaded.
This change moves to giving a stream that the rustoto upload function
consumes, that means only 1MiB should be read at a time. This reduces
the amount of memory use, especially when esthri is configured to use a
large amount of upload tasks.
--
Hopefully this shouldn't be too hard to merge into @notoriaga's other branch :grinning:

I think we could go about it two ways

We pull in download changes + blocking call removal stuff into this pr

If people like the direction my branch is going in (splitting up the crates etc) it'd be better to merge this into my branch and go from there

2 is probably slightly more work/touches more stuff etc, but both will probably be kind of awkward merges. The bio removal stuff is probably the most invasive change but also I think it's really valuable, a misplaced blocking call can lead to dead/livelock
Either way I could throw one of the two together tomorrow morning before going into the lab

And I'm using the term "merge" pretty loosely here - I think 1. would be easier to do via copy/paste

Spent a little bit of time testing this out on a SITL pod (which has much more bandwidth than I do :sweat_smile:) with this little script that recorded RSS memory usage and bytes sent over time, to get a feel for how these changes made esthri perform relative to the previous version and the aws tool. Not a perfect benchmark (and these were only run once, so they probably shouldn't be read into too much) but they're at least a little informative.
The tldr is that everything seems OK with this change, but have included the data below as it is interesting:
Esthri Old

Esthri New

aws

Esthri is much faster than aws, but uses more memory. It also negates some of that speed by seemingly taking a bit longer to finalize after everything seems to be updated. Not sure if this is when it's finalizing the multipart upload or if something else is going on - might be worth investigating this further at some stage, but at least it's not a regression.
I experimented with setting the task config to get a similar memory usage to aws, and luckily esthri is still on par with aws.

Also ran new and old under heaptrack with the default configuration as a sanity check, but these seemed to get a similar profile to my script:
Old

New

Either way I could throw one of the two together tomorrow morning before going into the lab (obviously free free to go for it @samvrlewis, I just feel back about the state my pr is in and don't want you to have to deal with the mess)

Happy for you to pull this into your branch, if you're happy to do it (I guess without the buffer pool stuff?). Otherwise I'm happy to have a look at this on Monday.
I haven't looked at download memory usage at all yet either, so keen to get your changes in if that helps there as, from what I saw, we were getting OOM errors in some workers during the 'sync down' phase.

Not sure if this is when it's finalizing the multipart upload or if something else is going on - might be worth investigating this further at some stage, but at least it's not a regression.

The finalization should just be an api call right? Fees like something is probably going on

And yeah the bufferpool was only for the uploads so we'll just use what you have. And from my (brief) experimenting I think we should be set with sync down, the new downloads seem to be using less than the aws cli

Closing, this was merged into https://github.com/swift-nav/esthri/pull/249 in https://github.com/swift-nav/esthri/pull/254

authors: notoriaga samvrlewis

repo: swift-nav/esthri


text:
Bug on network down

I noticed that when I run the radio and lose the connection, the audio session does not come back ... I made an update in the code using reacheability, I would like to know if I have the possibility to be a collaborator of the project or just show the code for you. Thank you!

Hello @bartollo- anyone can make a pull request. Thank you!

Hello @swiftcodex , I will do the pull request ... thanks!

hello) i try to convert Swift4 and no work)
i leave Swift3 but no work JSON )
oh and ah Use the Xcode9

@sdvigov you can check the xcode 9 branch : https://github.com/swiftcodex/Swift-Radio-Pro/tree/xcode9

authors: bartollo fethica sdvigov swiftcodex

repo: swiftcodex/Swift-Radio-Pro


text:
Add separate Builder class, use WasmTransformer

Resolves #127.

I want to note that if a binary is lowered into i32, it can't be used on some wasi compatible runtime like wasmtime. So the lowering should run only when targeting browser.

authors: MaxDesiatov kateinoigakukun

repo: swiftwasm/carton


text:
Fixed Header

I need the grid to have the fixed header

it will do that if you set the vertical scrolling as per some of the demos.
http://swimlane.github.io/ngx-datatable/#virtual-scroll
But you have to make sure your container for the table doesn't scroll otherwise you'll scroll the entire table out of the viewport, including the header.
I set an explicit size on ngx-datatable and datatable-body but various ways to do it as long as the scroll doesn't bubble to the container and scroll the table up out of view.

@dannyvenier - yup. thats how you do it. Thanks for helping out.

@AshishBohara89  is this solved

I dont think @pptyasar  that is solved. Also when I have fixed header there is no way to set it to auto and wrap text also doesn't work.

.ngx-datatable {
  overflow: unset !important;
  datatable-header {
    overflow: unset !important;
    position: sticky;
    background: #fff;
    top: 0;
    z-index: 100;
    &:before {
      content: ' ';
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      position: absolute;
      background: #fff;
    }
  }

authors: amcdnl bhushangahire danielehrhardt dannyvenier marraia pptyasar

repo: swimlane/ngx-datatable


text:
Multilingual Nanoset

In this PR I include the Multilingual Nanosets. As discussed w/ @negar-foroutan, it includes the following features:

New MultilingualNanosetDatasetsArgs. We create this new type of config to:
a. Be able to include custom tokens (Language tokens¿?) to prepend to the samples of each dataset.
b. Be able to differentiate in run_train.py Nanoset & MultilingualNanoset.
MultilingualNanoset. We are creating a train split or a valid split with the is_valid flag. The valid split is created extracting samples from the dataset, the rest are for training. The quantity of extracted samples is given by config.tokens.limit_val_batches * trainer.global_batch_size. In short, we can only control how many validation batches we want in each data parallel group. We do this in other to process the same number of validation samples in each and every DP group.
We prepend Language tokens¿? at the sample level, so a batch of data can contain samples from multiple languages.
We create the valid dataloader the same way* nanotron creates the training data loaders (In a lazy fashion, multiple stages) but it's still missing the validation loop.
I included a config file that consumes pretokenized data with datatrove & the gpt2 tokenizer stored in RCP. Check data_stages.data.dataset.dataset_tokens and tokens.limit_val_batches.

*The valid dataloader is created in the same way as the training one but we are just supporting the MultilingualNanoset, NOT the HF Datasets & Nanoset

After this morning's discussion:

The user will manually split the data in training and validation. The total number of samples will be computed once the MultilingualNanoset is created.
We print a total number of samples but the DataLoder will drop the last samples (drop_last=True) in order to keep the DP Groups balanced.

You can try the provided config file in RCP with 0.1 GPUs. In order to download some samples from the c4 dataset In multiple languages + preprocess them use the following code snippets:
import os

from functools import partial
from datasets import Dataset, load_dataset

def gen_from_iterable_dataset(iterable_ds):
    yield from iterable_ds

PATH_TO_RAW_DATASETS = "/mloscratch/homes/solergib/nf/nanotron-multilingual/raw_datasets"
splits = ["train", "validation"]
langs = ["en", "es", "fr"]

for split in splits:
    for lang in langs:
        it_ds = load_dataset("allenai/c4", lang, streaming=True, split=split).take(10000)
        ds = Dataset.from_generator(partial(gen_from_iterable_dataset, it_ds), features=it_ds.features)
        ds.to_json(os.path.join(PATH_TO_RAW_DATASETS, lang, f"{split}.json"))

for lang in es en fr; do
  for split in train validation; do
  python3 tools/preprocess_data.py --tokenizer-name-or-path meta-llama/Meta-Llama-3-8B --output-folder datasets/c4-$lang/$split --n-tasks 8 jsonl --dataset raw_datasets/$lang/$split.json
  done
done

repo: swiss-ai/nanotron-multilingual


text:
Update Hash Cracking.md

Hey 👋
Updating content with more information and more accurate resources.

Thanks you 👍

repo: swisskyrepo/PayloadsAllTheThings


text:
大神能给guzzle写个swoole的handler么

主要是guzzle的api已经大规模使用了，如果直接在guzzle上跑协程可以很快很兼容

@gouchaoer 本来是有这个想法, 这个lib其实是从自己项目里抽出来的, 如果有空的话会考虑实现一下.

authors: gouchaoer twose

repo: swlib/saber


text:
initialize_origin.py not installed

Hello,
I try to invoke the initialize_origin.py script from my launch file as such:
    <node pkg="swri_transform_util" type="initialize_origin.py" name="initialize_origin" >
        <param name="local_xy_frame" value="/map"/>
        <param name="local_xy_origin" value="Spata"/>
        <rosparam param="local_xy_origins">
            [{ name: Spata,
             latitude: 37.9879772,
             longitude: 23.9078602,
             altitude: 129.69,
             heading: 0.0}]
        </rosparam>
    </node>

I get the error:
ERROR: cannot launch node of type [swri_transform_util/initialize_origin.py]: can't locate node [initialize_origin.py] in package [swri_transform_util]

catkin can't see the python script as executable.
I fixed it by chmod +x the .py script, but it's not ideal.
I noticed that you recently added an install target to the script but perhaps it doesn't work?
I have the latest version of marti_common git pulled in my workspace.

Hmm... when I build and install swri_transform_utils in my own workspace, it looks like initialize_origin.py is installed and marked as executable in install/lib/swri_transform_util/initialize_origin.py .  Also, after installing the official ros-indigo-swri-transform-util package, it is installed and executable at /opt/ros/indigo/lib/swri_transform_util/initialize_origin.py
In your clone of the repository, is the file present & exectuable in marti_common/swri_transform_util/nodes/ ?  Also, does the CMakeLists.txt file for swri_transform_util have a catkin_install_python call for initialize_origin.py?

Ah, I have a guess on what's wrong.
I needed to format my laptop yesterday. I backed up and copy/pasted the marti_common folder in my new workspace.
However, the executable was assigned to my previous user account and hence the .py file was not executable any more.

authors: Georacer pjreed


text:
🛑 BestQA_GO is down

In 19999fb, BestQA_GO (https://www.bestqa.net/go/bestqa_dev/up) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BestQA_GO is back up in 0e3289a after 8 minutes.

repo: swuecho/upptime


text:
🛑 BestQA_GO is down

In 2092822, BestQA_GO (https://www.bestqa.net/go/bestqa_dev/up) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BestQA_GO is back up in 5c617b0 after 10 minutes.


text:
🛑 BestQA_GO is down

In cacb501, BestQA_GO (https://www.bestqa.net/go/bestqa_dev/up) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BestQA_GO is back up in 10b9099 after 6 minutes.


text:
🛑 BestQA_GO is down

In fe9fc4b, BestQA_GO (https://www.bestqa.net/go/bestqa_dev/up) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BestQA_GO is back up in ed303aa after 10 minutes.


text:
Feature: multiple directions

Describe the problem 🧐
Is it possible to use multiple directions depending on the link selected with a custom attribute?
Have i missed the info on this and how to apply multiple directions based on navigation paths?
Describe the propsed solution 😎
Custom HTML attribute?
Alternatives considered 🤔
writing additional js to get this to work.
How important is this feature to you? 🧭
I cannot use swup without it
Checked all these? 📚

[X] I have read and searched the official docs
[X] I have checked discussions and existing issues for related problems
[X] I agree to follow this project's Code of Conduct
[X] I have provided all necessary information to the best of my knowledge

@ShaneSheppard This isn't currently possible and not planned from our side. But feel free to submit a pull request with an implementation, and we'll happily take a look at it.

authors: ShaneSheppard daun

repo: swup/overlay-theme


text:
🛑 Random site is down

In d32a7ac, Random site (https://www.southernjive.co.uk) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Random site is back up in c3ca74b.

repo: sxa/aoupptime


text:
Any pop-up windows in rio terminal has jagged edges

What system are you running Yazi on?
macOS
What terminal are you running Yazi in?
Yazi 0.2.5 (Homebrew 2024-04-23) / rioterm 0.1.0
Did you try the latest code to see if this problem got fixed?
Tried, but the problem still
yazi --debug output

Yazi
    Version: 0.2.5 (Homebrew 2024-04-23)
    OS: macos-aarch64 (unix)
    Debug: false

Emulator
    Emulator.via_env: ("rio", "rio")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect: Iterm2

Adaptor
    Adaptor.matches: Iterm2

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY: None
    DISPLAY: None

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL: Some("/bin/zsh")
    EDITOR: Some("nvim")
    ZELLIJ_SESSION_NAME: None
    YAZI_FILE_ONE: None
    YAZI_CONFIG_HOME: None

file(1)
    Version: Ok(Output { status: ExitStatus(unix_wait_status(0)), stdout: "file-5.41\nmagic file from /usr/share/file/magic\n", stderr: "" })

Text Opener
    default: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block: Some(Opener { run: "${EDITOR:=vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

tmux
    TMUX: false

Ueberzug++
    Version: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/Users/cavivie/.local/state/yazi" directory.

Describe the bug
Rio terminal:

iTerm2 terminal:

macOS builtin terminal:

Expected Behavior
There should be no jagged edges on any pop-up windows. At least, this problem is not found in other terminals such as iterm2 and built-in terminal. Is it possible that this problem should be reported to rio?
To Reproduce
Install yazi in rio terminal, start yazi and pop up any built-in command window. To reproduce, press c to pop up the copy related window, or press g to pop up the change directory related window, etc.
Configuration
No response
Anything else?
No response

Is it possible that this problem should be reported to rio?

Yes, this is a bug introduced in Rio v0.1.0, see https://github.com/raphamorim/rio/issues/534. You can try reverting to an older version as a workaround until the devs fix it.
Closing as not Yazi.

authors: cavivie sxyazi

repo: sxyazi/yazi


text:
3.1.4: macOS drop in assets should ignore .DS_Store (maybe all dot files)

Describe the bug
macOS drop in assets should ignore .DS_Store (maybe all files that start with a . as they would be hidden on a unix system, so this might apply to the linux client as well)
To Reproduce

set up the drop in asset directory
create a file name .DS_Store in it (Finder on macOS tends to create these files)
view the drop in assets drop down:

Expected behavior
Users may be confused by this file -- generally unix systems hide files that start with .
Screenshots
See above
Desktop (please complete the following information):

OS: macOS

Fixed with 3.5.0


text:
Does not work on Chrome 75.0.3770.100 Mac Mojave 10.14.5

In case of bug report, please fill this template and remove italic lines
Otherwise, clear all and type :)
Browser:
Chrome Version 75.0.3770.100 (Official Build) (64-bit)
Mac OS 10.14.5 (Mojave)
Extension version:
0.22.0
Can be found here: chrome://extensions/?id=hcbgadmbdkiilgpifjgcakjehmafcjai
Expected behavior
What do you expect?
That any function of the extension would work. Nothing works, not even the built-in 'Rename-Tab' feature in the extension menu -- that rule does get created, but it doesn't work.  Have tried reloading tabs in rules and restarting Chrome; no change.
Actual behavior
What actually happen?
No rule actions happen.
Steps to reproduce the behavior
Please describe the steps to help me to reproduce the actual behavior

Create a rule, e.g:
Name: calendar tab
Detection: Contains
URL fragment: calendar.google.com
---Actions---
Title: my calendar
Pinned: on
Protected: on
---end of Action options---
Click Save

After the rule is saved, go to open Calendar tab and Refresh.
2a. If no tab already open, open the Calendar URL

expected:
After step 2/a, I expect:

the tab name to change to "my calendar"
when i try to close the tab, I will get asked if i want to close it

actual:

Tab name doesn't change
Tab closes with no warning

Hey @bluefire0
I have the same setup and it works well:

You can try by importing my rule:
{
    "settings": {
        "enable_new_version_notification": false
    },
    "rules": [
        {
            "name": "cal",
            "detection": "CONTAINS",
            "url_fragment": "calendar.google.com",
            "tab": {
                "icon": null,
                "muted": false,
                "pinned": false,
                "protected": false,
                "title": "my calendar",
                "title_matcher": null,
                "unique": false,
                "url_matcher": null
            }
        }
    ]
}

Can you just set the title and leave other actions as default?
Can you open the Chrome Console to check if any error is raised?
Best

repo: sylouuu/chrome-tab-modifier


text:
🛑 Absolute Landscape Solutions is down

In e265774, Absolute Landscape Solutions (https://absolutelandscapesolutions.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Absolute Landscape Solutions is back up in 93a56b1 after 37 minutes.

repo: symapex/upsite


text:
🛑 Bricktically is down

In eab45dd, Bricktically (https://bricktically.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bricktically is back up in 961016f after 12 minutes.


text:
🛑 The Great Gardens is down

In 647765a, The Great Gardens (https://thegreatgardens.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: The Great Gardens is back up in 3b7fd23.


text:
🛑 Blooming Pots Landscaping is down

In e4cd04b, Blooming Pots Landscaping (https://bloomingpotslandscaping.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Blooming Pots Landscaping is back up in 1208890 after 24 minutes.


text:
🛑 Absolute Landscape Solutions is down

In 2cb365d, Absolute Landscape Solutions (https://absolutelandscapesolutions.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Absolute Landscape Solutions is back up in e684661 after 20 minutes.


text:
🛑 Jacobs Floors is down

In 75de663, Jacobs Floors (https://jacobsfloorstx.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Jacobs Floors is back up in 270491c after 20 minutes.


text:
🛑 Dragues Well Repair is down

In 678622a, Dragues Well Repair (https://dragueswellrepair.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Dragues Well Repair is back up in 4454f2a after 31 minutes.


text:
🛑 Miami Home Cinema is down

In 70d7707, Miami Home Cinema (https://miamihomecinema.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Miami Home Cinema is back up in d0b20b2.


text:
🛑 Speedy Auto Clean is down

In 52dd4ac, Speedy Auto Clean (https://speedyautoclean.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Speedy Auto Clean is back up in 7f780a0 after 44 minutes.


text:
🛑 Cleanaroo is down

In e2a78ef, Cleanaroo (https://cleanaroonv.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cleanaroo is back up in 0d9d4f8 after 26 minutes.


text:
🛑 Speedy Auto Clean is down

In 66399fe, Speedy Auto Clean (https://speedyautoclean.com/) was down:

HTTP code: 500
Response time: 335 ms

Resolved: Speedy Auto Clean is back up in 134e2ca.


text:
🛑 Decor and Scape is down

In 966ebdf, Decor and Scape (https://decorandscape.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Decor and Scape is back up in 0c3ba5a after 56 minutes.


text:
Added support for ServerLog command

Support for https://github.com/symfony/symfony/pull/21080

The new handler option (whatever its final name) must be added to the XSD file.

The new handler option (whatever its final name) must be added to the XSD file.

It looks like the .xsd is really behind the Configuration. Are you sure I need to add something there?

It looks like the .xsd is really behind the Configuration. Are you sure I need to add something there?

IMO yes, if there is anything else missing, we should sync the XSD file in a separate PR.

@xabbuh I added a tests and it looks like I don't need to updated the xsd.

\o/ Finally green on all versions.

authors: lyrixx xabbuh

repo: symfony/monolog-bundle


text:
[LiveComponent] Dependent form fields logic broken when submitting the form

Minimal repro: https://github.com/gremo/github-issue-2240
I think there is a very obvious issue with the dependant form fields UX feature, take the meal example.
Let's add the logic for handing the form submission:
#[AsLiveComponent]
class MealPlanner extends AbstractController
{
    // ...

    #[LiveAction]
    public function save()
    {
        $this->submitForm();

        dd($this->getForm()->getData());
    }
}

Change also the form action and add a submit button:
{# ... #}

{{ form_start(form, {
    attr: {
        novalidate: true,
        'data-action': 'live#action:prevent',
        'data-live-action-param': 'save',
    }
}) }}
    <button>Save</button>
{{ form_end(form) }}

{# ... #}

Now let's use the form:

Select breakfast as meal
Select egg as food
Change meal to lunch (eggs are NOT in lunch choices)

Until now the form re-renders correcly with HTTP 200 status code. No validation errors are shown.
Now submit the form pressing the "save" button:

422 Unprocessable Content is returned, because the form is invalid
The "eggs" value is sent even if I didn't selected the food option (the placeholder "What's for lunch" is selected)
Value "eggs" is not in the lunch options, so it's an extraneous/invalid value
I think this is happening because of the nature of live components
No validation errors are shown!

Here is a short video of the steps:

I opened a similar issue https://github.com/SymfonyCasts/dynamic-forms/issues/35 but I think that problem is not related to the library itself.

Let's keep the "required" and there is no problem.. you should not be able to submit without selecting a value.
(try without         novalidate: true, )

Seems not a solution to me :)
And problem is even worst when one of the meal doesn't include any option.

This is the only "solution" i have .... as I don't see any bug on the demo.
Please look at the following video.
https://github.com/user-attachments/assets/3d368883-ac59-476b-93f2-3aa8b6fdc909

So @smnandre we rely on client side validation to make the form "work"?
And you are not considering one thing: meal could be optional, so required would not help here. Should I provide a more real example?

-- friendly tone here 😃 --
i just spent 15 minutes to understand your problem, replicate it, point were you missed something, record and post a video to show you the demo works exactly how it is supposed to.
And now you politely suggest me to look at another exemple, with another code.
I'm sorry.. i don't have that energy right now ;)
I'll check tomorrow or monday the other issue.

No problem, @smnandre. I really appreciate your work and time to look at this issue. My tone was meant to be "normal", I guess, but not being fully understood is frustrating 🥲
I understand that the example "works" thanks to the required attribute and client side javascript. Tomorrow I'll update my example to show that, in some situation, neither the required attribute will help.

My tone was meant to be "normal"

I know ;)

@smnandre I’ve updated the question and the repository, trying to explain myself as clearly as possible.
I’m not sure if I’m just unlucky 😢 , if no one has ever noticed this issue, or if there’s something wrong with the version of the libraries I have installed.
Personally, I believe no one has noticed this behavior before because, as you likely mentioned, they use the required attribute, which in my case should not be specified (since it must be possible to perform the search with empty values).

For the record:
the discussion continued acrosss repositories (😅 ) but point is:
there is some case not fully covered / implemented in the DependentFormField here...
Let's see if we can suggest something :)

To summarize what's mentioned in the repository and the excellent research by @smnandre : there is definitely an issue with the library, I quote the source code:
// A fake hidden field where we can "store" an error if a dependent form
// field is suddenly invalid because its previous data was invalid
// and a field it depends on just changed (e.g. user selected "Michigan"
// as a state, then the user changed "Country" from "USA" to "Mexico"
// and so now "Michigan" is invalid). In this case, we clear the error
// on the actual field, but store a "fake" error here, which won't be
// rendered, but will prevent the form from being valid.

The last statement seems odd since, in fact, the form becomes invalid in any case.
But @smnandre , let's pretend we're not using the Dependant Fields library, because in my opinion, the error is more of a logical one and lies in how the data submission is handled (in the context of live components). Here's a 'vanilla' example:
public function buildForm(FormBuilderInterface $builder, array $options): void
{
    $builder
        ->add('office', EnumType::class, [
            'class' => Office::class,
            'choice_label' => fn (Office $office): string => $office->getReadable(),
            'placeholder' => 'Any office',
            'required' => false,
        ])
    ;

    $formModifier = function (FormInterface $form, ?Office $office): void {
        $form->add('employee', EnumType::class, [
            'class' => Employee::class,
            'placeholder' => 'Any employee',
            'choices' => $office?->getEmployeeChoices(),
            'choice_label' => fn (Employee $employee): string => $employee->getReadable(),
            'required' => false,
        ]);
    };

    $builder->addEventListener(
        FormEvents::PRE_SET_DATA,
        function (FormEvent $event) use ($formModifier): void {
            $formModifier($event->getForm(), $event->getData()?->office);
        }
    );

    $builder->get('office')->addEventListener(
        FormEvents::POST_SUBMIT,
        function (FormEvent $event) use ($formModifier): void {
            $formModifier($event->getForm()->getParent(), $event->getForm()->getData());
        }
    );
}

What happens now? The errors are shown. But look what happens when:
Office 1 -> Employee 1 -> Office 3 -> Submit

We are now basically stuck. We can't go even back and select "Any office" and "Any employee", without a full page refresh.

Let's imagine all is easy and possible.  So regarding the best user-experience in this scenario..
.... what would be the best behaviour for a user, just after selecting "Office 3" ?
A) set Employee to "null"
B) set Employee to the "first accepted value of Office 3"
C) show an error
I personnaly would opt for A or B... what about you ?

But look what happens when [...]

I do agree this is a weird situation, and we'll try to find a good solution, but you cannot compare to anything "not live" because.... the Employee 1 -> Office 3 would simply not be possible :)
So more than a submit problem, it's a "invalid state that should not happen" in a way

what would be the best behaviour for a user, just after selecting "Office 3" ?

Option 1, set to null, without a doubt. If, for some reason, field B (which depends on A) is required, the validation stack will kick in, right? In my case, setting the employee to null is fine, allowing the user to submit the form and search for 'all employees that belong to office 3'.

the Employee 1 -> Office 3 would simply not be possible :)

You mean in a non-live scenario, right? Of course, yes. If we submit the form the traditional way and update the employee field accordingly, this wouldn’t be an issue. But in this case, the form updates as soon as you select 'office 3,' and then everything gets stuck.

But in this case, the form updates as soon as you select 'office 3,' and then everything gets stuck

I know i know ... 😅

Option 1, set to null, without a doubt

This is where i'll personnaly drop entirely formtrait and dependantformfieldd to just manually use 2 props 🤷
Again, DependantFormField is not an UX package currently, and this use case is legit but still very rare... and what you would expect here would prevent another one to get what they expected.
Probably stupid question, is it possible to make both fields dependant on ... the other one ?

I'm afraid I might need to write custom JavaScript for every similar situation (and work on setting field B every time field A changes).

No JS, just live component, mount, and onUpdate :) I really need to do other things today, but if you're stuck tomorrow i can maybe show you an example :)

+1 @gremo here I am having the same problem, I noticed that when removing the DynamicFormBuilder application it works as expected, did you get any solution?

@italodeveloper Unfortunately not, still searching for a solution.

non-elegant solution manipulate a fake select example with live components and its result as id or unique key and load it in the form via options it worked, ugly but it worked

I noticed that when removing the DynamicFormBuilder application it works as expected

Ho ? So we did fix something with the recent batch of changes in Live ? :)

I noticed that when removing the DynamicFormBuilder application it works as expected

Ho ? So we did fix something with the recent batch of changes in Live ? :)

I updated my project and everything seems to be working now, including DynamicFormBuilder. An observation to "circumvent" the state that doesn't change is to add this:
  'empty_data' => null,
  'placeholder' => 'FooBar'

This ensures that the user will always change the input and the live components work perfectly

Lett's thanks  #2403 and #2425 then :)
Can we close here, or we can do something on LiveComponent ?

An observation to "circumvent" the state that doesn't change is to add this:

Would you have a ultra-small example for this ?
(or just tell me like a bullet list what component is parent / live / dependant) ...

authors: gremo italodeveloper smnandre

repo: symfony/ux


text:
[Map]  Console error when displaying a map using a Live Component

After update to SF UX 2.2, i've got an error with showing the map using a Live Component.
Before 2.2, I had to create the ComponentWithMapTrait in my repo, and it worked just fine, but since the update today, I've got this error in the console when trying to see a Position on the map. On my form it still works well.
stimulus.index-b5b1d…b4a1e94e3bc92a.js:7 Error connecting controller

TypeError: Cannot read properties of null (reading 'lat')
    at Object.project (leaflet.index-0fc72e…45ac26ac.js:7:14529)
    at Object.latLngToPoint (leaflet.index-0fc72e…45ac26ac.js:7:13167)
    at e.project (leaflet.index-0fc72e…45ac26ac.js:7:37903)
    at e._getNewPixelOrigin (leaflet.index-0fc72e…45ac26ac.js:7:44363)
    at e._move (leaflet.index-0fc72e…45ac26ac.js:7:40715)
    at e._resetView (leaflet.index-0fc72e…45ac26ac.js:7:40423)
    at e.setView (leaflet.index-0fc72e…45ac26ac.js:7:28465)
    at e.initialize (leaflet.index-0fc72e…45ac26ac.js:7:27756)
    at new e (leaflet.index-0fc72e…e45ac26ac.js:7:2997)
    at Module.si (leaflet.index-0fc72e…45ac26ac.js:7:48247)

<?php

namespace App\Twig\Components;

use App\Entity\Position;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\DefaultActionTrait;
use Symfony\UX\Map\Live\ComponentWithMapTrait;
use Symfony\UX\Map\Map;
use Symfony\UX\Map\Marker;
use Symfony\UX\Map\Point;

#[AsLiveComponent]
final class MapComponent
{
    use DefaultActionTrait;
    use ComponentWithMapTrait;

    #[LiveProp]
    public ?Position $position = null;

    protected function instantiateMap(): Map
    {
        if (!$this->position?->getLatitude() && !$this->position?->getLongitude()) {
            return (new Map())
                ->center(new Point(48.8566, 2.3522))
                ->zoom(6);
        }

        return (new Map())
            ->addMarker(
                new Marker(
                    new Point(floatval($this->position->getLatitude()), floatval($this->position->getLongitude())),
                )
            )
            ->fitBoundsToMarkers();
    }
}

<twig:DashboardCard>
                    <twig:block name="title">Localisation</twig:block>
                    <twig:block name="content">
                        {% if mission.position.latitude %}

                                <twig:MapComponent position="{{ mission.position }}"/>

                        {% else %}

                                Aucune position pour cette mission

                        {% endif %}
                    </twig:block>
                </twig:DashboardCard>

import {Controller} from "@hotwired/stimulus";

export default class extends Controller
{
    L;
    map;
    markers;
    static targets = ['latitude', 'longitude'];

    connect() {
        this._onConnect = this._onConnect.bind(this);
        this._onMapClick = this._onMapClick.bind(this);
        this.element.addEventListener('ux:map:connect', this._onConnect);
    }
    disconnect() {
        this.element.removeEventListener('ux:map:connect', this._onConnect);
    }

    _onConnect(event) {
        this.L = event.detail.L;
        this.map = event.detail.map;
        this.markers = event.detail.markers;

        this.map.on('click', this._onMapClick);
    }

    _onMapClick(event) {
        this.removeAllMarkers();
        this.createMarker(event.latlng)
        if (this.latitudeTarget && this.longitudeTarget) {
            this._addPositionToForm(event.latlng);
        }
    }

    createMarker(position) {
        const marker = this.L.marker(position).addTo(this.map);
        this.markers.push(marker);
    }

    removeAllMarkers() {
        this.markers.forEach(marker => marker.remove());
        this.markers = [];
    }

    _addPositionToForm(position) {
        this.latitudeTarget.value = position.lat;
        this.longitudeTarget.value = position.lng;
    }
}

Hi @LaurentSanson and sorry that.
Thanks to your reproducer, I've been able to reproduce it and I just opened https://github.com/symfony/ux/pull/2420, can you tell me if it fixed your issue?

Hi Hugo,
Thanks for the quick reply. I'll try tomorrow morning and let you know.
Cheers,
Laurent
Le lun. 2 déc. 2024, 19:07, Hugo Alliaume @.***> a
écrit :

Hi @LaurentSanson https://github.com/LaurentSanson and sorry that.
Thanks to your reproducer, I've been able to reproduce it and I just
opened #2420 https://github.com/symfony/ux/pull/2420, can you tell me
if it fixes your issue?
—
Reply to this email directly, view it on GitHub
https://github.com/symfony/ux/issues/2417#issuecomment-2512317644, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ANPER5SB6KXVN4DKM5LB6V32DSOWVAVCNFSM6AAAAABS3JHFN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJSGMYTONRUGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Morning @Kocal, I've tried it this morning and this is good for me! Well done 💪

Hey Laurent, perfect :)
I will merge soon, hoping for a new release fast (can be delayed a bit due to the SymfonyCon).
For the moment I suggest you to lock your symfony/ux-map dependencies to 2.21 🙏🏻

authors: Kocal LaurentSanson


text:
[Site] fix: hide IconSearchBox on mobile when AppHeader is open

Q
A

Bug fix?
yes

New feature?
no

Issues
Fix #...

License
MIT

(Issue 1711 - 3)
When the AppHeader in the icon page on mobile the IconSearchBox is undesirably visible. This PR aims to hide it.

Thanks for this great first PR {{ author }}!

Actually that's the second ! ;)

authors: kbond raphael-geffroy


text:
Conflicting fixers

Thank you for ECS!
I recently came across this conflict which I thought would be worth highlighting for those adhering to PSR-12.
In PHPCS there is a PSR-12 sniff for checking the format of a file header. This works without issue.
However, if you have PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer also enabled in ECS, it will remove what the PSR-12 standard expects.
You then end up fighting with the fixers with one adding a newline and the other removing it. The obvious solution is to just omit the NoBlankLinesAfterPhpdocFixer but it is a useful fixer for removing multiple blank lines. The only difficulty is PSR-12 expects one newline to remain or at least that is how PHPCS interprets the standard.

Hi, I'm glad it's useful to you :)
As for conlicting checkers, we have a list of conflicts that should prevent this.
See
https://github.com/symplify/symplify/blob/3b3359f264e95bceff6599a56ab80f28ad44d195/packages/easy-coding-standard/src/DependencyInjection/CompilerPass/ConflictingCheckersCompilerPass.php#L18
It's possible it's incomplete, mainly for PSR-12.
It shold be updated to prevent the same problems you describe.
What do you think?

Sounds good to me! Thanks for the fast reply

Could you send PR with update that fixes your case?

See https://github.com/symplify/easy-coding-standard/pull/10/

repo: symplify/symplify


text:
#2334: Autodiscovery: NamespaceDecetor not work for doctrine mapped-superclass

Fixed

Thank you

authors: TomasVotruba dotdevru


text:
Enable PHPUnit colors on CI

Somehow colors are not working even though colors=true in phpunit.xml.

Somehow PHPUnit doesn't look at the colors="true" while running on Github Actions. Locally it does work fine with colors. Explicitly adding --colors=always to the runner argument makes sure colors are enabled again.

CLI should not be poluted with value, that are provided in phpunit.xml.
There is some bug in loading config or in PHPUnit in GitHub Actions.

authors: TomasVotruba ruudk


text:
[MonorepoBuilder] Added contract for tag resolving

It allows you to use a different tag resolving strategy.

Hi, thanks for the feature :+1:
Before reviewing, the CI must pass so we can check only what is not covered in CI.

@TomasVotruba done.

Awesome, thank you!
How do you plan to use it?

I think we need sort tags by semver on current branch. This can be done by changing default sorting command
private const COMMAND = ['git', 'tag', '-l', '--sort=v:refname', '--merged'];

and providing current branch name parameter using Option::DEFAULT_BRANCH_NAME as a last item in command array.
So we create a new service implementing this interface and change the default MostRecentTagResolver service in DI.
But why?
Because we can checkout tag e.g. 1.2.3 on new branch, which is behind latest repository tag 1.3.5 and then make a new patch 1.2.4. MostRecentTag resolver allows create only a tag 1.3.6. But wee need fix version 1.2.x without features which are not available until version 1.3.x. I'm not sure if this is good approach after all, but i didn't invented anything better. I'm open for better ideas 😁

I see. Basically supporting multiple branches at once and you need patch version to resolve in each of them separately.
Thanks for explaining :+1:

authors: TomasVotruba milanobrtlik


text:
Fix ginkgo stability in github actions

After upgrading ginkgo version earlier this afternoon it appears github actions runners have become unstable, passing on the feat/node-rebased branch but then failing after being merged to main.

Moved this to draft status until we get to the bottom of it.

repo: synadia-io/nex


text:
feat: complete packet relay between 2 axon chains

complete sending and receiving ICS20Transfer packet between two IBC contracts in one Axon chain:

upgrade solidity contract WriteAcknowledgement event to accept Packet.Data as parameter, which is used in Hermes event conversion process
adjust Axon monitor logic to prevent long-time block which can cause unworkable subscription of monitor
adjust conneciton/channel/packet transaction hash caching logic in Axon endpoint
complete some unimplemented or todo logic in Axon endpoint to pass through the packet relay process

ps. ibc-solidity-contract changes are listed here: https://github.com/synapseweb3/ibc-solidity-contract/pull/16

@Flouse is it ok to merge?

@Flouse @blckngm please look at the new commit for resolving problems mentioned previously in this PR

LGTM. There's some compile errors after rebase?

authors: ashuralyk blckngm