text:
Extent selection position is incorrect when SuperEditor is placed inside a CustomScrollView

Steps to reproduce:

In "Sliver Demo Editor", select some text and move the selection extent

Expected: selection is painted from the base position till the extent position (close to cursor)
Actual: extent position is not correct

So I was doing a bit of testing for this issue, and it’s a really weird one.
Basically the extent offset (as mentioned by @miguelcmedeiros) is calculated incorrectly when there is an ancestor ScrollView. The extent offset is grows exponentially as the size of the text in the editor increases (and thus the selection grows as well).
For example, with the default text in the editor, if we apply an addition of Offset(0, 300) to Line 547, the offset is now correct and the selection seems fine (if you select somewhere in the middle of the text). The offset grows as the scroll position grows.
After some testing, I found that this function is the one responsible for this behavior. It seems that while calculating the correct offset for the autoscrolling behavior, it produces a bug for the selection. More specifically, the interactorBox.localToGlobal  is the one messing up here.
I fixed this by creating a new function which calculates the offset for selection only by converting the interactorOffset to the local viewport offset. This makes more sense as we only care about the viewportOffset for the selection (not the Scrollable offset).
Fixed behavior can be seen below:

@agenthesh thanks for looking into this. I'll take your description and see what I can put together for a fix. If you have any great ideas writing effective tests for this, without a whole lot of complexity, please let me know.

@agenthesh FYI - I tried making the same change that's in your "Selection fix within a SliverScrollView" commit that's linked above, and it didn't seem to have any impact on the sliver demo in the example app. The scroll position is still off. Was there more to your suggested fix?

Sorry, I did try to write tests for it, but I couldn't get anything concrete together for it. And yeah, tested it again after pulling your changes, and it's stopped working. On a maybe related note: I cannot seem to debug the code anymore after pulling your changes. Do you know what the cause could be? Seems to be related to this as well

@agenthesh I've been making changes to project dependencies to make the new mono repo work. Unfortunately, every attempt solves one problem and creates another. At the moment, in my local repo for development, I changed the pubspec dependencies in super_editor_markdown and the super_editor example app to use relative paths, instead of the Git paths.
The problem with the Git paths is that they're using whatever is on GitHub, which obviously doesn't have any of your local changes. Therefore, you might make changes locally and they don't seem to do anything, and that's why.
Obviously, we still need to do something about these references, but for now that path change is the best I've come up, locally.
Please let me know if that unblocks you.

I think I've confirmed that the root cause of this issue are the changes I made in this PR: https://github.com/superlistapp/super_editor/pull/450
By reverting those changes, the embedded scrolling seems to work OK, but it breaks regular autoscrolling again. So I need to figure out what the correct original solution should have been.

I believe I've solved the problem, though I'm still not entirely sure why the fix is necessary. I'm going to experiment with creating some tools to help visualize scrolling for debug purposes, and also possibly break the auto-scroller away from the doc selection. I'll aim to have a PR up sometime tonight, regardless of my progress on tooling.


text:
fromPromise always prints warning

It seems like the logic in fromPromise prints:
[neverthrow] - `fromPromise` called without a promise rejection handler - Ensure that you are catching promise rejections yourself, or pass a second argument to `fromPromsie` to convert a caught exception into an `Err` instance

when the errorFn is defined. This logic is backwards, right?
See https://github.com/supermacro/neverthrow/blob/master/src/result-async.ts#L27
Also see my commit that fixes it: https://github.com/supermacro/neverthrow/commit/6294b2c6f19fe60126c26848c795008aab5af67a
Do you want me to create the PR? I know that travis is broken for contributors but I could test locally if you want?

Hey @jsmith,
Ahh, yes good catch.
Contributions are welcome. Yes, please run CI checks locally. I will also run them on my machine before any merging is done.
For context, the intended logic in the if block that you reference was:
If (is_browser_environment OR
   (is_node_environment AND NODE_ENV !== production)) AND
   errorFn_not_defined
then
  log warning to user

source: gharchive/issue

authors: jsmith supermacro

repo: supermacro/neverthrow

license: MIT

license_type: permissive

license_source: github-api


text:
This pull request adds support for Swift Package Manager

Summary
Fixes #80

Added support for SPM
Added installation instruction for SPM
Added build script in CI pipeline
Bumped cocoapod version and SPM version to 3.1.1

Hey @superpeteblaze,
I have bumped the version and created the tags,
Mistakenly I wrote wrong commit message, so this forced push,
But it's all good now.

I merged and fixed some minor references. Tagged and released! 🚀 Thanks again for the contribution @DominatorVbN 🙌🏽

source: gharchive/pull-request

authors: DominatorVbN superpeteblaze

repo: superpeteblaze/ScalingCarousel

license: mit

license_source: bigquery


text:
🛑 Node - de-053d2451.yalaso.top is down

In 0145495, Node - de-053d2451.yalaso.top (http://de-053d2451.yalaso.top/api/v1/ping) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Node - de-053d2451.yalaso.top is back up in 52417f8.

repo: superrr-vpn/status


text:
Styles missing in SSR example.

BUG REPORT TEMPLATE
Vue.js version and component version
Vue2.x vue-awesome-swiper 3.1.3
What is Expected?
The SSR example is missing the style/css import from swiper
What is actually happening?
When loading the component as described in the SSR example all styles are missing and the swiper is not working properly.
Solve: Import all styles in the nuxt plugin.

you should include styles manually in the plugin or in the component where you use a swiper like so
import 'node_modules/swiper/dist/css/swiper.min.css';
or if you are using sass/postcss in your

@AndrewBogdanovTSS Good job!

authors: AndrewBogdanovTSS surmon-china wirsing

repo: surmon-china/vue-awesome-swiper


text:
How to turn off grab and slide to right & left sliding effect! And use the controllers only!

Could you help me, please?

you just have to set the "simulateTouch" option to false


text:
能否为Quill添加全屏支持

在很多场景，文本编辑组件都只能放在一个特定大小的容器里，对于编辑来说，全屏体验会更好。
因此能否对Quill进行扩展，对full screen进行支持

This component is a simple and lightweight editor. It doesn't depend on any other resources except quill core and css. Quill is an open source prototypical editor which has a powerful extension API and module registration function. If you need any other attached functions, please program on your own or use other extention modules. Finally, please don't ask the questions like whether i can realize some function in the editor or why not. Thanks.

authors: sunfaces surmon-china

repo: surmon-china/vue-quill-editor


text:
change authenticate to return true false rather than throw an error ?

Would you consider changing the return type of authenticate to true/false rather than throwing an error.
The reason this can be problematic, is that for example in a framework like sveltekit, redirection is done using a throw. This complicates the logic quite a bit.
I know this would be a breaking change, so I would understand if it's not possible, just thought I might ask.

Hi! Returning just false instead of throwing an error will potentially cover up the reason for authentication failure.
That said, you could catch any thrown errors and return false yourself:
const token = await db.signin({
    // I'm using root auth as an example here.
    // The same principle applies to ns/db/sc signin, or the signup/authenticate functions.
    user: 'root',
    pass: 'root'
})
    // Make sure value is a string and not undefined
    .then((v) => v ?? false as false)
    // Return false for any thrown errors
    .catch(() => false as false);

    // I strongly typed false as false here because later on we probably want to check just for `false`.
    // If not, the type will be `string | boolean`.
    // If you want cleaner code, return `undefined` in the`.catch()` function.
    // That way you can drop the `.then()` function and still simply check if the value is truthy

With this, you will be left with either a type like string | false.
Let me know if that works for you!

I was thinking of the authenticate method actually.
That is the one that will mostly be used after the initial signin.
That method returns nothing.
I've usually got something like this on the server
  try {
    await db.authenticate(jwt);
    let databaseResults = await db.query(
      `
SELECT * FROM user WHERE id = $user;
SELECT * FROM daily_rate WHERE time::floor(created_at - 5h, 1d) = time::floor(time::now() - 5h, 1d) ORDER BY created_at DESC FETCH from_currency, to_currency;
`,
      { user: user_id }
    );
    return { databaseResults };
  } catch (e) {
    console.log(e);
    throw redirect(303, '/signin');
  }

but most likely the authenticate error should be handled differently than the query error. That's why I was thinking of using the return part of the authenticate function to try to do something different.
This is coming from sveltekit.
catching the authenticate is fine, but the then part is falsy as well.
How about just returning true in case authentication is successfull ?
I could also add a small try catch around the authenticate to try to handle this case in a particular way. It's more boilerplate, but it's more correct. Somehow I'm wishing for something a little more elegant, but maybe that's as beautiful as it gets with typescript.

Ah, yes! It indeed makes sense to return true for the .authenticate() function! I will patch this up soon along with some other changes for a v0.9.0 release!

Could it also not throw as well ? (if possible)
In order to handle the unauthenticated case a little more gracefully.

throw is made just for that, so I won't remove it. I will probably make it optionally graceful when you pass a token to the .connect() function, as this is something you currently cannot really get around :)

So the correct way to handle authentication before the 0.9.0 release is
  const authenticated = await db.authenticate(jwt).then(() => true)
    .catch((e) => {
      console.log(e);
      return false
    })
  if (!authenticated) throw redirect(303, '/signin');

(this is with sveltekit that uses throw to redirect).
and after it should be something like
  const authenticated = await db.authenticate(jwt).then((response) => response)
    .catch((e) => {
      console.log(e);
      return false
    })
  if (!authenticated) throw redirect(303, '/signin');

Just want to make sure I understand correctly.

Yep! That's a way to tackle it!

Surreal.connect should be an async function otherwise we cannot catch exceptions

try {
   new Surreal("wss://xyz.com/rbc", {auth: {pass: "wrongPassword"}})
} catch {
    ...
}

// call inside connection is async and is thrown outside the try block.

new Surreal(), should not call connect automatically

authors: happysalada kearfy wedobetter


text:
Upgrade BMO and address media issues

This PR addresses the following things.

Media Deployment is now enabled by default
Media Ingress and SC are removed from the chart
Media PVC is now configurable via the Values file
Metal3 labels are improved:

baremetal-operator-controller-manager-7bf86f5bff-9xwxv   2/2     Running   0          15m    app.kubernetes.io/component=baremetal-operator,app.kubernetes.io/instance=metal3,app.kubernetes.io/name=manger,control-plane=controller-manager,pod-template-hash=7bf86f5bff,webhook=metal3-io-v1alpha1-baremetalhost
metal3-metal3-ironic-6df64c659c-9hffz                    4/4     Running   0          15m    app.kubernetes.io/component=ironic,app.kubernetes.io/instance=metal3,app.kubernetes.io/name=metal3-ironic,pod-template-hash=6df64c659c
metal3-metal3-mariadb-6d85d8c4f8-vxbg6                   1/1     Running   0          15m    app.kubernetes.io/component=mariadb,app.kubernetes.io/instance=metal3,app.kubernetes.io/name=metal3-mariadb,pod-template-hash=6d85d8c4f8
metal3-metal3-media-5cbbffd8c7-rl68w                     1/1     Running   0          15m    app.kubernetes.io/component=media,app.kubernetes.io/instance=metal3,app.kubernetes.io/name=metal3-media,pod-template-hash=5cbbffd8c7

BMO version is upgraded to 0.5.1

The PR is tested in a local environment.
Resolves #90, resolves #91

lgtm but one reservation re enable_metal3_media_server changing default - that will make the default flow slightly easier, but we'll have to disable it for Sylva I think and in some other cases users may have existing solutions they wish to use instead - @ipetrov117 what are your thoughts, should we go ahead with this and adjust the Sylva values?

authors: Kristian-ZH hardys

repo: suse-edge/charts


text:
fix(react): remove useless variable assigning in useIsomorphicLayoutEffect

Overview

I remove isClient in useIsomorphicLayoutEffect
close #281
PR Checklist

[x] I did below actions if need

I read the Contributing Guide
I added documents and tests.

@manudeli Thank you! 🙏
@minsoo-web
There is also the same code in test-utils/ThrowError, which should be fixed 😄

@manudeli Yes! I add co-author with @ssi02014 thanks!
@ssi02014 I remove it too! fix(react): remove useless function define in ThrowError thanks!

Cool !

repo: suspensive/react


text:
Overview page of all collections

The overview page should show all collections that the user made.

A overview page that shows all collections has been implemented.

repo: svandaalen/Dexter


text:
swat integration tests for apache2 cookbook

Hi  @svanzoest !
I have just created an integration tests for apache2cookbook using swat -  DSL for rapid web tests development.
To run them:
$ kitchen test swat

Hi guys! Any news here?

Looks like Travis started failing after your two most recent commits.

Or rather, there is at least one more error since your last two commits.

Hi @drpebcak  my modification do not touch recipe logic at all, please take a look at Travis report

Looks like "upstream" version is not healthy , https://travis-ci.org/svanzoest-cookbooks/apache2/builds/95664672 - all recent travis jobs for this have been failing ...

I was looking specifically at this: https://travis-ci.org/svanzoest-cookbooks/apache2/builds/103554685#L267

@svanzoest any thoughts on including another suite of tests?

I was looking specifically at this: https://travis-ci.org/svanzoest-cookbooks/apache2/builds/103554685#L267

fixed here - 93a8d67ec98b26fccf295aa15ad12b07c2b0a7c4

Hi guys! Any thoughts on possible collaboration?

I am okay with adding additional test suites as long as they will be maintained. Currently we have chefspec and serverspec that we are maintaining. I do not have the bandwidth to maintain more than that across all of our platforms. I could see us support policyfile type audits/tests to stay aligned with chef corporate, but that would likely mean forgo-ing serverspec in the long run.
@melezhik what is your intent and goals for collaboration?

Hi ! @svanzoest ! Thanks for feedback.
My intention is to "apply" swat DSL to test various web applications. There are a lot of examples you could take a look at SparrowHub. Recently I came up with interesting idea of using SWAT DSL in testing chef cookbook developments. Why?

Swat tests are very agile and fast to develop - it takes a few time ( literally minutes ) to create a new tests for even complex web application ( http headers, cookies, html forms, named parameters, serial requests, post, gets, heads etc )

I can't see real alternative for complex integration testing for chef / ansible /  configuration development , see next

Chefspec /  serverpsec are fine but they don't allow you to write complex tests with sending complex  server http requests  and then analyzing  output which. So there is real need for such a tool. Even an InSpec won't cover all the gaps here.

Swat could be easily integrated and cross platformed as it relies on Perl - mostly pre-installed for many platforms and if even not - sparrow cookbook cares about it

Swat tests suites are run via standard bash plugin for test kitchen - a few lines of code - they are really easy to deliver

Swat tests are kind of blackbox - so in some way are more objective. They could be developed in parallel with cookbooks. They could be used as specification. (TDD,BDD). They are easy to debug and very pragmatic, as idea behind SWAT - send request and analyze an output . They don't require knowledge of perl to be used. As tests fails you may kitchen ssh and just analyze server output gets saved in tetx file, that is very simple.

As for the apache2 cookbook consider a following use cases:

checking basic/digest, OPEN_ID authentication ( mod_auth , mod_auth_open_id... )
checking https ( mod_ssl ) - self signed or CA certificates
checking virtual hosts via sending dedicated http requests
checking allow access directives via sending http requests

( Imagine to implement this with serverspec :smile: )
So in short word I guess our collaboration could be helpful in "both directions". The PR I have just sent is for demonstration purposes only. I'd like to hear if there are real needs for for such test automation beside those one I listed. At least as I can see apache2 cookbook provides many configuration choices for end user , not only installing bare bones apache server, if so I should|could be tested automatically and for many platforms, which could be achievable by SWAT.

Hi @melezhik,
I agree that those are all important things to do, but they seem to be more useful at a higher level when implementing actual websites, not just the basic deployment of them.
For example, we do not know what virtualhosts someone would want, what SSL settings they plan to use or even what Apache httpd directives someone will have configured.
It makes more sense to have folks use it in those wrapper cookbooks as this level none of the intent you are capturing is known. We just provide the building blocks for them to configure those things easier with sane defaults. We actually plan to remove some of the non-ASF provided modules, so they could be maintained separately and therefore have more focus as we only have bandwidth for so much.
I do not see how to apply swat at this level and would be another thing to get up to speed on, if I do not use it elsewhere. As you say, it would be best to target Web Applications themselves.

Hi @svanzoest , thanks for reply . I do see your considerations. However sometimes difference between providing building blocks for something and building something not that apparent , so if you will however in the future need some tool for web test automation , swat could be one the choices for you. The example I provided just show the way how one could easy embed integration testing into chef cookbook developments . Regards . Alexey

definitely. It would be good to see how it would fit in compared to Capybara,  redbot, har, gauntlt, casperjs, watir, rspec-api and the like. So much choice around testing that you need to look at which one makes the most sense. It seems like swat definitely has a place I just do not see me implementing it currently in the apache2 cookbook.
Thanks again for informing us of swat.

authors: drpebcak melezhik svanzoest


text:
import-meta-resolve dependency breaks Yarn 4 Plug'n'Play/Zero-installs

Describe the bug
Yarn 4 Plug'n'Play/Zero-installs were supported up until SvelteKit 2.0.7.
Downgrading with yarn add -D @sveltejs/kit@2.0.7 resolves any issue with Yarn 4 Plug'n'Play/Zero-installs.
Ever since SvelteKit 2.0.8, Plug'n'Play/Zero-installs are no longer supported due to the incompatibility with import-meta-resolve.
Reproduction

Create a new project with create-svelte

$ yarn create svelte example && cd example
yarn create v1.22.21
[1/4] Resolving packages...
⠁ (node:2276661) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-svelte@6.0.6" with binaries:
      - create-svelte
[#######] 7/7
create-svelte version 6.0.6

┌  Welcome to SvelteKit!
│
◇  Which Svelte app template?
│  Skeleton project
│
◇  Add type checking with TypeScript?
│  Yes, using TypeScript syntax
│
◇  Select additional options (use arrow keys/space bar)
│  none
│
└  Your project is ready!

✔ Typescript
  Inside Svelte components, use <script lang="ts">

Install community-maintained integrations:
  https://github.com/svelte-add/svelte-add

Next steps:
  1: cd platform
  2: yarn install
  3: git init && git add -A && git commit -m "Initial commit" (optional)
  4: yarn run dev -- --open

To close the dev server, hit Ctrl-C

Stuck? Visit us at https://svelte.dev/chat
Done in 6.44s.

Enable Yarn 4 Plug'n'Play/Zero-install and install packages

$ corepack enable
$ yarn set version stable
$ yarn config set nodeLinker pnp
$ yarn install

Run development server

$ yarn dev

Logs
error when starting dev server:
Error: Cannot find package '@sveltejs/vite-plugin-svelte' imported from /home/user/example/dummy.js
    at __node_internal_ (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/lib/errors.js:431:11)
    at new NodeError (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/lib/errors.js:374:5)
    at packageResolve (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/lib/resolve.js:1038:9)
    at moduleResolve (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/lib/resolve.js:1101:20)
    at defaultResolve (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/lib/resolve.js:1266:15)
    at Module.resolve (file:///home/user/.yarn/berry/cache/import-meta-resolve-npm-4.0.0-13a6ef4fd3-10c0.zip/node_modules/import-meta-resolve/index.js:32:12)
    at resolve_peer_dependency (file:///home/user/example/.yarn/unplugged/@sveltejs-kit-virtual-93c8ce76c9/node_modules/@sveltejs/kit/src/exports/vite/index.js:132:29)
    at sveltekit (file:///home/user/example/.yarn/unplugged/@sveltejs-kit-virtual-93c8ce76c9/node_modules/@sveltejs/kit/src/exports/vite/index.js:167:27)
    at async Promise.all (index 0)
    at async asyncFlatten (file:///home/user/example/.yarn/__virtual__/vite-virtual-75c9d0056a/4/.yarn/berry/cache/vite-npm-5.0.11-d5457a8b86-10c0.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:12894:16)
    at async resolveConfig (file:///home/user/example/.yarn/__virtual__/vite-virtual-75c9d0056a/4/.yarn/berry/cache/vite-npm-5.0.11-d5457a8b86-10c0.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:67863:29)
    at async _createServer (file:///home/user/example/.yarn/__virtual__/vite-virtual-75c9d0056a/4/.yarn/berry/cache/vite-npm-5.0.11-d5457a8b86-10c0.zip/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:60327:20)
    at async CAC.<anonymous> (file:///home/user/example/.yarn/__virtual__/vite-virtual-75c9d0056a/4/.yarn/berry/cache/vite-npm-5.0.11-d5457a8b86-10c0.zip/node_modules/vite/dist/node/cli.js:764:24)

System Info
System:
    OS: Linux 6.6 CachyOS Linux
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i9-13900H
    Memory: 20.99 GB / 30.98 GB
    Container: Yes
    Shell: 3.7.0 - /bin/fish
  Binaries:
    Node: 21.5.0 - /tmp/xfs-6a97206b/node
    Yarn: 4.0.2 - /tmp/xfs-6a97206b/yarn
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.1.0
    @sveltejs/kit: ^2.0.0 => 2.2.0
    @sveltejs/vite-plugin-svelte: ^3.0.0 => 3.0.1
    svelte: ^4.2.7 => 4.2.8
    vite: ^5.0.3 => 5.0.11

Severity
annoyance
Additional Information
No response

Yarn PnP is broken, and we don't support it — if it ever worked, it was by accident. It is a frequent source of misery for OSS maintainers, and we strongly recommend using nodeLinker: 'node-modules' or (better) just using npm/pnpm.

I'm using pnpm and getting same error after bumping from v2 to v2.3
Error: Cannot find package '@sveltejs/vite-plugin-svelte' imported from /Users/.../kit/dummy.js

Solved it... I didn't have this dev dependency:
"@sveltejs/vite-plugin-svelte": "^3.0.1",
So I was getting the dummy.js error posted above (not the nicest error!).
I had missed this migration step for kit v2:
@sveltejs/vite-plugin-svelte@3 (this is now required as a peerDependency of SvelteKit — previously it was directly depended upon)

authors: Rich-Harris maximdeclercq rob-balfre

repo: sveltejs/kit


text:
"Properties" from shadow edpoints should be present in __layout.svelte

Describe the problem
Heres a route

The shadow endpoint (index.js) exports a property that is available to the index.svelte. But the property is not available to __layout.svelte
Files:
tlayout.zip
Describe the proposed solution
Make properties available in __layout.svelte to make the experience the same and not having to use load
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response

That would be a change to Svelte-Kit's design, where layout components run before the other components in the file. Shadow endpoints are meant to be equivalent to writing a load() function in their corresponding component, i.e. the handlers in index.js should be at the same level of the hierarchy as the load() function of index.svelte. Since __layout.svelte can pass data down to index.svelte via the stuff parameter, obviously the layout code must run before the index.svelte code and therefore cannot use any of index.svelte's results, or there would be a circular (and infinite) loop.
So while I'm not Rich Harris and can't read his mind, I'm quite confident that this feature request will not be implemented. I'll leave this issue open for a few more days to let others chime in if they disagree, with reasons why the design of shadow components should be changed. But I expect I'll be closing this issue sometime next week.

The only way is to get the data in getSession that way:
// src/hooks.js
/** @type {import('@sveltejs/kit').GetSession} */
export function getSession(event) {
  if (event.url.pathname == '/todos') {
    const data = 'urlSessionXData'; //getData(event.url.pathname);
    return { [event.url.pathname]: data };
  }
}

layout prop from session if pathname: {hello}

Because only from getSession can you directly pass data to __layout.svelte.

@rmunn I see what you mean but I thought of the handler as something that provided the shadow endpoints to everything in the request - just as getsession does. See @lukaszpolowczyk workaround

The layout docs say "there are elements that should be visible on every page". So I figured that if a dev want something available on every page, layouts is the place. But I think what is being said here is the "if you want data on every page then layouts is not the place". As a dev, I don't care what runs first but I do want data from endpoint available everywhere. Or is that place a store. Either way, I suggest layout docs be updated to say that __layout.js and "shadow" eindpoint is not supported.

I successfully moved to getsession.
I vote for data being avail to layouts. It makes sense to me to think of it as request level data

Layouts are for things common to every page. Pages' props aren't: they are specific to each page so they aren't available to layouts.
Besides, @rmunn's point stands: endpoints run after layouts. If you need some data in a layout, you can get it in its load() instead and pass it down to pages through stuff. In the future, this should also be possible through layout endpoints and possibly middleware—both of which would still run before page endpoints.

Yes that's how it works. I'm just saying - why?
It's because a runs b4 b - ok, maybe it could be reversed?
It does seem to me that a requests data logically was made available to layouts. Why not (other than this is how today)?
Get it from the "load() " which page endpoints are trying to minimise the use of. Why is that better?

Thanks for being patient :-)
I saw page endpoints as a way to keep logic out of layouts, pages and components. By running first and making result available for all rendering elements. I still think it makes sense.
I think that page endpoints / shadow endpoints was exactly introduced  a smarter way than load, for covering some but not all stuff -  but I can't remember where I saw this.
Thanks. Now I understand the intended use of page endpoints better.
Can you confirm that there is no way for a page endpoint to deliver data to a layout for SSR ?
Example:
/pages/[slug].svelte
/pages/[slug].js
In endpoint we use slug to lookup page data in headless CMS. Some page data is page title, which is defined in layout.
I don't see how to make them avail for SSR?

You can use stuff for that:

add a load function to your page
pass the desired properties to stuff
access that through the $page.stuff store in your layout

https://kit.svelte.dev/docs/loading#output-stuff
Closing as the desired feature is available this way already

FWIW, I was/am also confused by the intended design. I would bet most folks who are coming from a server-side web dev background, (e.g. django, rails, etc.) will expect data rendered by the server to be available to layouts. But from what I gather, the design for SvelteKit sort of assumes you're either using a load() function in your layout, (and not using an endpoint) and passing the results to components nested inside the layout. Or, you're using endpoints to render every page's full set of data and not using layouts that require server-side data that the endpoint returns.

For anyone coming here looking to understand @dummdidumm recommendation, here's an example. Key notion is that pages have to pass the data "up" to the layout by pulling the data out of props and putting it into stuff.
// src/routes/index.ts
export const get = () => {
  const user = await getUser()
  return {
    body: {
      user
    }
  }
}

Hello {user.name}
<slot/>

authors: coryvirok dummdidumm jesperordrup lukaszpolowczyk mrkishi raydaly rmunn


text:
$env/dynamic/* does not work on Windows when running in vite dev mode on the server/nodejs.

Describe the bug
The dynamic environment variables from $env/dynamic/public & $env/dynamic/private do not work when running on the server in Windows, in development mode. However, it works on the browser/client (for PUBLIC_ env vars), and it also works on the server as expected when run from a production build.
Reproduction
Here's a link to a repro on StackBlitz - unfortunately, the StackBlitz environment is different from Windows - it works fine there but it doesn't work on Windows.
https://stackblitz.com/edit/sveltejs-kit-env-windows-issue?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2F%2Bpage.server.js%3AL5-L5
Running locally on Windows:

Logs
No response
System Info
System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
    Memory: 9.27 GB / 31.90 GB
  Binaries:
    Node: 16.16.0 - C:\nodejs\node.EXE
    Yarn: 1.22.18 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.15.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.70)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.67
    @sveltejs/kit: next => 1.0.0-next.445
    svelte: ^3.46.0 => 3.49.0
    vite: ^3.0.8 => 3.0.9

Severity
serious, but I can work around it
Additional Information
No response

It's already here https://github.com/sveltejs/kit/issues/6152
Waiting for a fix as well

Duplicate of  #6152

authors: DoisKoh StrawHatHacker dummdidumm


text:
Fixes REPL targeting bug in Safari

In Safari, right clicking an element in the REPL preview and selecting "Inspect Element" would yield the wrong iframe as the target.
The correct iframe (.tab-content) has a class of .visible to display it, simple fix is to add z-index: 1 to the declaration

Tested this on macos Safari, Firefox, Chrome. All seems to work well without side effects. Thanks for the fix!

authors: bluwy mattpilott

repo: sveltejs/sites


text:
adds charts (line, area, bar)

This adds examples of a basic line chart + responsive area and bar charts to the Svelte.technology REPL.

thank you!

authors: Rich-Harris popovichN


text:
Re-optimize Svelte libraries when compile options change

Describe the problem
Because the optimized Svelte libraries depend on some Svelte compile options, whenever the Svelte options change we want to trigger a re-optimize when using the prebundleSvelteLibraries option.
Describe the proposed solution
This info is currently kept in a _svelte_metadata.json in the Vite cache dir. So whenever that file doesn’t exist or if we compare and it’s stale, we would re-optimize.
As part of this, we should check if this metadata json is correctly saved in the right place, and not accidentally purged by Vite 3's new prebundling flow, eg the .vite/deps_temp thing.
Alternatives considered
Ideally we may want Vite to expose an API to say “mark optimized deps as stale and re-optimize on next run”
Importance
nice to have

We already restart the devserver on svelte config change here: https://github.com/sveltejs/vite-plugin-svelte/blob/c5d5354ff01d2c1f0da8d8ac71f452b230a0fa21/packages/vite-plugin-svelte/src/utils/watch.ts#L57
and server.restart has a flag to force reoptimization https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/index.ts#L265
So to implement this, we have to check if the project has svelte dependencies and add that information to the restart call. Re-optimize always has to be done in full, as there could be dependencies between optimized dependencies that need to be updated as well.
const forcePrebundle = hasSvelteDeps();
server.restart(forcePrebundle);

Question is how to get that information there.

server.restart has a flag to force reoptimization

That link is outdated, so here's a permalink for reference: https://github.com/vitejs/vite/blob/27e28328235d2f5c6a44129a7635b697097ec50a/packages/vite/src/node/server/index.ts#L271
Ok, so the challenge is we call watcher.on and need to know if the project has svelte dependencies from within the watcher. I think there's two possible solutions here:

the first would be to have some type of global variable that stores whether there's any svelte dependencies detected
the second would just to to always force reoptimization. I think this would be fair to do because the vast majority of projects of any reasonable complexity will have a svelte dependency and changing the Svelte config is relatively rare. If a project doesn't have any Svelte dependencies then it's probably cheaper on average to reoptimize. While we could certainly do better in that case I think it'd be okay for us to take the easy way out as a quick way to get the prebundling feature turned on

Always reoptimizing would also affect non-svelte libraries. At the very least we should only do it when prebundleSvelteLibraries is active

Not sure if I miss something, but I think this is already implemented in the buildStart hook:
https://github.com/sveltejs/vite-plugin-svelte/blob/74fd16db25d0be6c624e3d7e77b170ff7afb34ed/packages/vite-plugin-svelte/src/index.ts#L91-L94
It is sort-of a hack but it prevents unnecessary restarts.

ah, thanks! closing this then

authors: benmccann bluwy dominikg

repo: sveltejs/vite-plugin-svelte


text:
feat: enable support for exports condition

This PR enables using an export condition svelte to point at svelte source files.
eg this exports map
	"exports": {
		"./*": {
			"svelte": "./src/components/*"
		},
		".": {
			"svelte": "./index.js"
		}
	}

allows you to either import {SomeThing} from 'some-lib' when index.js exports SomeThing, or import SomeThing from 'some-lib/SomeThing.svelte'  if you prefer a deep import to avoid the index.
This is a very simplistic example and the real usecase is to still allow exporting compiled svelte files or other js files via the import condition.
See https://nodejs.org/api/packages.html#conditional-exports for what you can do with export conditions.

do we need additional tests, eg a scenario with mixes svelte field and exports condition? Is the usage i described above what we want to go for?
i tried using the .svelte extension with glob but it didn't work even if the node docs show tha *.js is a thing.
We only ever expect libraries to use the .svelte extension with preprocessed .svelte output, never other extensions like .svx that require additional markup preprocessors to be present, correct?
	"exports": {
	       // boohoo, didn't work in my tests
		"./*.svelte": {
			"svelte": "./src/components/*.svelte"
		},
		".": {
			"svelte": "./index.js"
		}
	}

I wonder if it's just *.svelte that doesn't work or if other extensions are affected. My guess is that it's an existing Vite bug, but it might be nice to confirm and file an issue.

i tried using the .svelte extension with glob but it didn't work even if the node docs show tha *.js is a thing.

Yeah I think this should technically work too, hoping it's only a bug on not some hidden nodejs spec.


text:
Method replaceFirst does not exist.

D:\phpStudy\WWW\laravel\myCMS>php artisan make:view index --extends=welcome
Method replaceFirst does not exist.

Could you run composer install and try again? It looks like this is an issue with the Str helper class in Laravel's Support package, but the method has not been removed.
Let me know if that fixes the issue 😃

Closing due to inactivity, let me know if you're still having this issue 🙂

authors: jackdudh svenluijten

repo: svenluijten/artisan-view


text:
Add SvgUnitConverter unit tests

Reference Issue

#805
What does this implement/fix? Explain your changes.

Adds SvgUnitConverter unit tests
Any other comments?

@mrbean-bremen This is ready for review and merge.

@mrbean-bremen This is ready for review and merge.

repo: svg-net/SVG

license: MS-PL


text:
GAMES_006 Hangman

As a user I want to play Hangman with various words to pass time.
Acceptance criteria:

Implement a simple Hangman game
Add a fixed default vocabulary
User can guess a given word letter by letter
In every run a different word is shown
For every word guessed correctly the user gets a point

link main menu hangman button to start this game

Use application context for the ScoreTracker class.


text:
@JsonUnwrapped required properties will not be copied

See: https://github.com/springdoc/springdoc-openapi/issues/1060
When a Type is annotated with @JsonUnwrapped and the unwrapped class does have required properties they won't be mapped to the unwrapping Schema.
I've already resolved the issue and created a PR

Just noticed that this is a duplicate to: https://github.com/swagger-api/swagger-core/issues/3879

repo: swagger-api/swagger-core


text:
Migrate from maven-bundle-plugin to bnd-maven-plugin for finer OSGi meta…

…data
fixes #3842
Signed-off-by: Raymond Augé raymond.auge@liferay.com

fix unfortunate commit text...

Hi @frantuma thanks for reviewing :)

The main one: if I am not mistaken the generated JARs manifests do not include anymore an Automatic-Module-Name entry, even if this seems to be configured in the new plugin. This would need to be fixed to consistently provide automatic module name to JDK 9+ modules based envs.

If you perform a binary comparison of the resulting jars before and after (which I have done for all jars) you will note that the Automatic-Module-Name is correctly preserved.

There are differences in the outcome related to Export-Package, Import-Package and possibly Require-Capability for all modules; This is probably ok, and even "better" than what previously provided but I cannot at the moment do thorough tests in OSGi env for all modules to verify their correct behaviour. I guess you are more familiar and up to date with OSGi internals, and actively using swagger-core in OSGi, I would therefore ask you to confirm that all packages have been tested in OSGi env and that they correctly define imports and exports.

This is expected and desired :) I've tested the result in OSGi using the Apache JAX-RS Whiteboard project for which I wish to update the version of swagger if/when this change gets merged/released.
I'm also prepared to keep the metadata up to date and address issues (as time permits) if someone pings me.
Thanks for you time and effort on swagger.

Hi @frantuma thanks for reviewing :)

The main one: if I am not mistaken the generated JARs manifests do not include anymore an Automatic-Module-Name entry, even if this seems to be configured in the new plugin. This would need to be fixed to consistently provide automatic module name to JDK 9+ modules based envs.

If you perform a binary comparison of the resulting jars before and after (which I have done for all jars) you will note that the Automatic-Module-Name is correctly preserved.

There are differences in the outcome related to Export-Package, Import-Package and possibly Require-Capability for all modules; This is probably ok, and even "better" than what previously provided but I cannot at the moment do thorough tests in OSGi env for all modules to verify their correct behaviour. I guess you are more familiar and up to date with OSGi internals, and actively using swagger-core in OSGi, I would therefore ask you to confirm that all packages have been tested in OSGi env and that they correctly define imports and exports.

This is expected and desired :) I've tested the result in OSGi using the Apache JAX-RS Whiteboard project for which I wish to update the version of swagger if/when this change gets merged/released.
I'm also prepared to keep the metadata up to date and address issues (as time permits) if someone pings me.
Thanks for you time and effort on swagger.


text:
SwaggerParser.parse(String swaggerAsString) always returns null

As it delegates to SwaggerParser.parse(String swaggerAsString, List<AuthorizationValue> auths) passing a null value as the second parameter which leads to the conditional statement in this method to always be false.
public Swagger parse(String swaggerAsString) {
    return parse(swaggerAsString, null);
}

public Swagger parse(String swaggerAsString, List<AuthorizationValue> auths) {
    Swagger output;
    try {
        output = new Swagger20Parser().parse(swaggerAsString);
        if (output != null && auths != null && auths.size() > 0) {
            return new SwaggerResolver().resolve(output, auths);
        }
    } catch (IOException e) {
        // continue;
    }
    return null;
}

Fixed in develop branch!

authors: nmcb olensmar

repo: swagger-api/swagger-parser


text:
Want to edit footer section

Footer section need to have some social-media-icon and some content also. Can I work on this issue.
It looks like:-

Dear Sir,
I want to ask why had you closed that issue.
I haven't started working on it yet.
With regards,
Ruchi Chaurasia
On Thu, May 26, 2022, 23:15 Swapnil Srivastava @.***>
wrote:

Closed #891
https://github.com/swapnilsparsh/30DaysOfJavaScript/issues/891 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/swapnilsparsh/30DaysOfJavaScript/issues/891#event-6687365668,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ASP4DJSWNJFZJJHY4VJ2ITTVL62FLANCNFSM5XBSCFJA
.
You are receiving this because you authored the thread.Message ID:
@.***
com>

Dear Sir, I want to ask why had you closed that issue. I haven't started working on it yet. With regards, Ruchi Chaurasia
…
On Thu, May 26, 2022, 23:15 Swapnil Srivastava @.> wrote: Closed #891 <#891> as completed. — Reply to this email directly, view it on GitHub <#891 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASP4DJSWNJFZJJHY4VJ2ITTVL62FLANCNFSM5XBSCFJA . You are receiving this because you authored the thread.Message ID: @. com>

There is no need for changes required in the footer.


text:
backend/drm: fix black screens when enabling output

This patch fixes this failure:
01:57:16.642 [ERROR] [backend/drm/drm.c:360] Failed to page-flip output 'eDP-1': a page-flip is already pending
01:57:16.684 [ERROR] [backend/drm/drm.c:360] Failed to page-flip output 'eDP-1': a page-flip is already pending
01:57:16.684 [ERROR] [backend/drm/drm.c:732] Failed to initialize renderer on connector 'eDP-1': initial page-flip failed
01:57:16.684 [ERROR] [backend/drm/drm.c:805] Failed to initialize renderer for plane
01:57:16.684 [sway/config/output.c:423] Failed to commit output eDP-1

References: https://github.com/swaywm/sway/issues/5101

Thanks!

authors: ddevault emersion

repo: swaywm/wlroots


text:
swc reuses _variable name when importing different modules with same filename in CommonJS

Describe the bug
When a single file imports multiple different files with the same filenames, and swc uses interopRequireDefault, it reuses the same local variable to store both, when it should use a different local variable.
For example when a single file imports ./foo/bar and ./baz/bar, they are both named bar so the local variable used for both is _bar.
Input code
I can reproduce using the JS API:
const swc = require('@swc/wasm');
swc.transformSync(`
  import A from "./foo/a";
  import B from "./bar/a"
`, {
  module: {type: 'commonjs'}
})

The output is:
"use strict";
var _a = _interopRequireDefault(require("./foo/a"));
var _a = _interopRequireDefault(require("./bar/a"));
function _interopRequireDefault(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}

Config
N/A
Expected behavior
Since the 2 imported modules are different, the local variable should be different as well.  tsc emits code like this:
const a_1 = __importDefault(require("./foo/a"));
const a_2 = __importDefault(require("./bar/a"));

Version
The version of @swc/wasm: 1.2.58
Additional context
Add any other context about the problem here.

Does swc today have a mechanism to request unused variable names in top-level scope?  Can this be accomplished with the hygiene pass?  It looks like hygiene is concerned with finding collisions between identifiers in the input code, whereas imports are stored on hidden variables that do not appear anywhere in the input source.

You can use private_name! macro to create a such identifier.
hygiene pass will convert it to actual unused identifier at the end.

I see, thanks.  It looks like the identifiers are being created today with local_name_for_src.  Sometimes it is being wrapped in private_ident!; sometimes not.  I'll try adding the missing private_ident! calls and see if that fixes it.

repo: swc-project/swc


text:
Add failing test for xhtml code escape in tsx

This PR adds a breaking test illustrating a bug in printing of transformed tsx code where html escape sequenced in source tsx are not unescaped in the compiled code when compilation target is > ES5.
It looks like the difference in behaviour for target <= ES5 and the newer versions is here: https://github.com/swc-project/swc/blob/master/ecmascript/codegen/src/lib.rs#L2497
I'm not sure I really understand this logic so maybe @kdy1 can clarify it and advise what would be the right way to fix it. I'm happy to include the fix into this PR if so

@kdy1 sorry for bothering you but this bug affects us quite severily, I'd love to contribute a fix, just need a bit guidance here

I fixed it with https://github.com/swc-project/swc/pull/1501 :)

Thanks a ton, you are a great human! 🙌


text:
Issues with R paths

At a workshop I just ran we ran into issues with R not being in the path on a number of Windows computers. In the past this has been caused because R likes to change the path where it installs itself and we've needed to change the function that searches for R. The new path that is causing issues is:
C:\Program Files\R\R-3.2.4revised\bin

Fantastic.  Does R not install its path in %PATH% when you install it?

If we already have people installing Python via Anaconda, we could add R via conda which might simplify things. https://www.continuum.io/blog/developer/jupyter-and-conda-r

Does the R package for conda include R Studio?  How much do the R workshops rely on R Studio, or do they use Jupyter more?

No, Conda does not have RStudio. I just tested it this morning on a windows machine and realized its not so easy. The conda r-essentials works great for Jupyter notebook, and is available on the command line, but I can't get RStudio to run correctly with it.
I think it maybe a permissions issue? Anaconda is installed for a user, not admin, so the conda R version is in /Users/exampleuser/AppData/Local/Continuum/Anaconda3/. By default RStudio only looks for R installed via a windows installer. I can set the path to the conda version, but it doesn't seem to actually work.
So unless someone figures out how to make it work with RStudio, I guess its not helpful.
However, using conda r-essentials is the easiest way to make R available to Jupyter notebook.

The naming scheme for "R-3.2.4-revised" was an exception and R maintainers (relatively) quickly realized that it wasn't a good idea to come up with a naming scheme that was never used before. They soon after released 3.2.5 and probably won't use this naming scheme ever again (see the 3.2.5 release notes https://stat.ethz.ch/pipermail/r-announce/2016/000601.html). They even removed 3.2.4-revised from the list of previous releases.

Fixed by #46.  Going to try to build a new version of the installer ASAP.

authors: embray ethanwhite evanwill fmichonneau

repo: swcarpentry/windows-installer


text:
Add explanatory text for scanning QR-code

I think that we need to add some helper texts for scanning the QR-code.
A good example is Kivra - https://accounts.kivra.com/bankid-auth
Also, for accessibility, we should add a frame around the QR-code (can this be done with CSS?)

@martin-lindstrom The QR code has had a border and corner since #75!

authors: martin-lindstrom oestrogen

repo: swedenconnect/bankid-saml-idp


text:
Not possible to manage the boolean data of a row

I'm submitting a ...  (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
I can't manage a simple control (if it is True or False) of a boolean row to write a given string.
Expected behavior
If the row in question is true, write "Active".
If the row in question is false, write "Passive".
Reproduction of the problem
Before opening this issue I asked for help on stackoverflow but without solving ... the problem is described here: https://stackoverflow.com/questions/56290893/ngx-datatable-how-to-handle-a-boolean-data-of-a-row
What is the motivation / use case for changing the behavior?
The reason is that in the table the boolean value comes out while I must be able to insert a string value (therefore only in the visibility of the table).
Surely something escapes me ...
Please tell us about your environment:
"node": ">= 8.9.4",
"npm": ">= 5.6.0"

Table version:
10.4.0

Angular version:
Angular 6

Browser:
All

Language: "
typescript": "~3.2.4"

Hello @nobady90,
Looks like you aren't properly using the documentation of ngx-datatable.
As you can check at the Inline Template / source code section, it is pretty easy to achieve the desired behaviour as you can see below:

In my example, rows is the source data array and value is the status property value of each row.
Replace the *ngIfstatements with the boolean check like as *ngIf="value" and *ngIf="!value" and that's it!

Cheers!

perfect, it worked. I missed this step. thank you!

repo: swimlane/ngx-datatable


text:
🛑 Integrations is down

In 69e2195, Integrations ($STATUS_INTEGRATIONSURL) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Integrations is back up in 38577a6 after 7 minutes.

repo: swipload/status


text:
Accordion is white on gray background only in Firefox

According to the design (https://www.figma.com/file/xZ0IW0MJO0vnFicmrHiKaY/Components-Post?type=design&node-id=17964-19595&mode=design&t=vpWlURmWHXKsP1ro-4), an accordion on a white background should be gray and white on a gray background. This behaviour only works in Firefox. Chrome, Safari and Edge show a gray accordion on a gray background.
Firefox:

Others:

Changing backgrounds is not documented anymore.

repo: swisspost/design-system


text:
Use Saucy-compatible YAML API for Indigo

Fixes #420

Note that these changes don't need to be merged into Jade or Kinetic.  Jade requires at least Ubuntu Trusty, which supports the newer YAML API.

repo: swri-robotics/mapviz


text:
ci(production): remove features to merge changes on prerelease branches

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] Any dependent changes have been merged and published in downstream modules

:tada: This PR is included in version 2.12.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


text:
🛑 BestQA is down

In 102628a, BestQA (https://www.bestqa.net/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BestQA is back up in 08725eb.

repo: swuecho/upptime


text:
🛑 BestQA_GO is down

In ba2fc38, 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 68a66c7.


text:
New swup API function: swup.getFragmentVisit(route)

Description
Injects an API function into swup to allow to retrieve the fragment visit object for any route. Example:
import Swup, { Location } from "swup";

const swup = new Swup({
  plugins: [
    new FragmentPlugin({ rules }),
  ],
});
/**
 * Get the fragment visit when hovering internal links
 */
const onHoverLink = ({ target: el }) => {
  const isLink = el instanceof HTMLAnchorElement;
  if (!isLink) return;

  // ignore external links
  if (el.origin !== location.origin) return;

  // ignore anchor links
  if (el.getAttribute("href")?.startsWith("#")) return;

  // ignore links to same page
  if (
    Location.fromElement(el).url === Location.fromUrl(window.location.href).url
  )
    return;

  const fragmentVisit = swup.getFragmentVisit?.({
    from: Location.fromUrl(window.location.href).url,
    to: Location.fromElement(el).url,
  });
  // Log the result (either a FragmentVisit or undefined)
  console.log(fragmentVisit);
};
// Delegate mouseenter
swup.delegateEvent(swup.options.linkSelector, "mouseenter", onHoverLink, {
  capture: true,
});

Drive-by

don't set the logger to undefined on unmount
warn if swup's cache is false, not true 🤦♂😁

Checks

[x] The PR is submitted to the master branch
[x] The code was linted before pushing (npm run lint)
~The documentation was updated as required~ Maybe later :)

Could there be a more descriptive name for the function? I have a hard time understanding what it returns, not knowing the plugin internals. To be fair, 99% of users will never use this, but it'll show up in autocomplete when installed. What creates the visit? The plugin?

authors: daun hirasso

repo: swup/fragment-plugin


text:
🛑 Random site is down

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

HTTP code: 0
Response time: 0 ms

Resolved: Random site is back up in 0dcd21f.

repo: sxa/aoupptime


text:
🛑 Random site is down

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

HTTP code: 0
Response time: 0 ms

Resolved: Random site is back up in 0b4a7f1.


text:
🛑 雙龍體育WIKI is down

In f84b032, 雙龍體育WIKI (https://wiki.ssangyongsports.eu.org/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 雙龍體育WIKI is back up in 3d40925.

repo: sxadxsx/upptime


text:
Task :react-native-agora:compileReleaseJavaWithJavac FAILED

It is working good in debug mode but in release I got this error :
Task :react-native-agora:compileReleaseJavaWithJavac FAILED
Here is my package.json file :
"dependencies": {
"@babel/runtime": "^7.4.5",
"@eva-design/eva": "^1.0.1",
"@valdio/react-native-scrollable-tabview": "^0.8.12",
"accordion-collapse-react-native": "^0.1.11",
"axios": "^0.19.0",
"html-entities": "^1.2.1",
"moment": "^2.24.0",
"native-base": "^2.8.2",
"react": "^16.13.1",
"react-native": "^0.62.2",
"react-native-agora": "2.9.1-alpha.3",
"react-native-awesome-alerts": "^1.2.0",
"react-native-bouncing-preloader": "^1.0.1",
"react-native-btr": "^1.1.4",
"react-native-dash": "0.0.9",
"react-native-date-picker": "^2.7.3",
"react-native-datepicker": "^1.7.2",
"react-native-dates": "^2.0.4",
"react-native-document-picker": "^3.2.4",
"react-native-easy-grid": "^0.2.2",
"react-native-floating-action": "^1.18.0",
"react-native-gesture-handler": "^1.6.1",
"react-native-image-crop-picker": "^0.25.3",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-maps": "^0.26.1",
"react-native-modal-datetime-picker": "^7.6.0",
"react-native-multiple-select": "^0.5.3",
"react-native-ratings": "^6.5.0",
"react-native-raw-bottom-sheet": "^2.0.5",
"react-native-reanimated": "^1.9.0",
"react-native-render-html": "^4.1.2",
"react-native-restart": "0.0.13",
"react-native-screens": "^2.8.0",
"react-native-simple-time-picker": "^0.2.0",
"react-native-snap-carousel": "^3.8.4",
"react-native-star-rating": "^1.1.0",
"react-native-svg": "^12.1.0",
"react-native-swipeable-cards": "^1.1.23",
"react-native-swipeable-flat-list": "^0.1.1",
"react-native-ui-kitten": "^4.1.0",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "^8.0.2",
"react-navigation": "^3.11.1",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0"
},
How can I solve this please ?
Thanks in advance .

any more build log?

facing same issue on release build

I am also facing this same issue as @ank26oct after bundleRelease but works with metro server

I have resolved it by adding following:

Add these permissions in AndroidManifest.xml

Edit android/proguard-rules.pro add following :
-keep class io.agora.**{*;}

mkdir -p android/app/src/main/assets
curl "localhost:8081/index.bundle?platform=android&dev=false&minify=true" -o "android/app/src/main/assets/index.android.bundle"
cd android
./gradlew assembleRelease

Thanks @ank26oct -keep class io.agora.**{*;} fix the issue for me, I am left with remote video not showing now

@MariaNabil have you migrate to AndroidX? maybe you should add android.enableJetifier=true to your gradle.properties

repo: syanbo/react-native-agora


text:
🛑 Concrete Connected is down

In 92a5ea1, Concrete Connected (https://concrete-connected.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Concrete Connected is back up in 1d6fcce after 24 minutes.

repo: symapex/upsite


text:
🛑 AZ Brick Frames is down

In 3393657, AZ Brick Frames (https://azbrickframes.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: AZ Brick Frames is back up in b269216 after 17 minutes.


text:
🛑 Concrete Elementz is down

In a994081, Concrete Elementz (https://concreteelementz.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Concrete Elementz is back up in a76e84f after 4 hours, 6 minutes.


text:
🛑 Bugmode Pest Control is down

In 1e658ad, Bugmode Pest Control (https://bugmodepestcontrol.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bugmode Pest Control is back up in 1148813.


text:
🛑 Superior Surface is down

In 374745d, Superior Surface (https://superior-surface.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Superior Surface is back up in 4c13ded after 20 minutes.


text:
🛑 Environ Work is down

In e6b815b, Environ Work (https://environwork.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Environ Work is back up in f872303 after 49 minutes.


text:
🛑 Alpha Landscaping is down

In aa23f89, Alpha Landscaping (https://alpha-landscaping.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Alpha Landscaping is back up in eb747a0 after 10 minutes.


text:
🛑 Tidy Cleaners is down

In c9797a2, Tidy Cleaners (https://tidycleanerstx.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Tidy Cleaners is back up in 99b07da after 1 hour, 27 minutes.


text:
🛑 Carpetomatic is down

In 508daca, Carpetomatic (https://carpetomatic.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Carpetomatic is back up in 47fb843 after 12 minutes.


text:
🛑 Scrubble Carpet Cleaners is down

In 49d2127, Scrubble Carpet Cleaners (https://srubblecarpetcleaners.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Scrubble Carpet Cleaners is back up in 8e8bde2 after 10 minutes.


text:
🛑 Clean Wise is down

In b6e2dbf, Clean Wise (https://cleanwisenv.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Clean Wise is back up in a0927bc after 1 hour, 28 minutes.


text:
🛑 Crycket Pest Control is down

In 6ecf03c, Crycket Pest Control (https://crycketpestcontrol.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Crycket Pest Control is back up in 34275a4 after 10 minutes.


text:
🛑 Cleanaholic is down

In 5869ef6, Cleanaholic (https://cleanaholictn.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Cleanaholic is back up in b95c9bb after 40 minutes.


text:
🛑 Scrubble Carpet Cleaners is down

In 11abd72, Scrubble Carpet Cleaners (https://srubblecarpetcleaners.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Scrubble Carpet Cleaners is back up in c76e142 after 10 minutes.


text:
🛑 Bugmode Pest Control is down

In 034a09b, Bugmode Pest Control (https://bugmodepestcontrol.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Bugmode Pest Control is back up in cf3de78 after 10 minutes.


text:
🛑 Tidy Helpers CA is down

In 44dc529, Tidy Helpers CA (https://tidyhelpersca.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Tidy Helpers CA is back up in 2141470 after 10 minutes.


text:
🛑 Global Translation is down

In 668e84d, Global Translation (https://globaltranslationsrvs.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Global Translation is back up in afff9e1 after 1 hour, 20 minutes.


text:
🛑 Boosted Audio is down

In bcc43da, Boosted Audio (https://boostedaudioor.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Boosted Audio is back up in 1c66839.


text:
🛑 Rigid Ground Work is down

In e840b49, Rigid Ground Work (https://rigidgroundwork.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Rigid Ground Work is back up in 445f762 after 34 minutes.


text:
Please create a version tag

Hi,
Can you please tag and version this project?
I am the Debian Maintainer for goleveldb and versioning would help Debian keep up with development.
The long explanation:
Distributions like Debian and Fedora have automated tools that monitor upstream websites like GitHub to keep up with version numbers. Instead of checking your repository manually from time to time for updates, some notification mechanism will tell me that there is a new version to package. We maintain lots of packages and checking manually is not possible. Unfortunately, this infrastructure is not capable of generating version numbers just by checking the master branch.
So, if you could create versions from time to time, that'd help us loads!
Thanks.

vgo is coming... and it requires it.
@syndtr Please add a tag, v1.0.0 is probably good enough for now

@syndtr Bump, this is the last step for full Go module support
Please run
git tag v1.0.0
git push --tags
```

Thank you for merging my stuff!

Done :)

authors: TheTincho syndtr tandr terorie

repo: syndtr/goleveldb


text:
Guest pages add "https://github.com/" before guests' URLs

Website links on guest pages currently point to GitHub with the guest's URL value appended.  I believe this link should point directly to the guest's URL.
For example, the link on https://syntax.fm/guest/feross-aboukhadijeh points to https://github.com/https://feross.org/:

It looks like "https://github.com/" is hardcoded before the guest URL on this line.  I think this can probably be removed outright, but any guest URLs that don't begin with a schema would become relative links.

If i'm not mistaken, this should be fixed with https://github.com/syntaxfm/website/pull/1470

authors: jm-wilson themisterholliday

repo: syntaxfm/website


text:
Remove author tags

Authors tags don't provide much use. Multiple authors will work on a file over time, just adding more people using tags seems counter-productive. Additionally any version control system will have the capability to track who created/modified/deleted a file.

Pull Request Test Coverage Report for Build 6735119238

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 46.915%

Totals

Change from base Build 6495781627:
0.0%

Covered Lines:
1525

Relevant Lines:
3012

💛  - Coveralls

authors: coveralls mitchellolsthoorn

repo: syntest-framework/syntest-javascript


text:
Add timezone for each user and fix timezone issues

closes #791

[ ] Dokumentieren in der Entwickler doku wie wir mit Zeiten umgehen und wo wir welche Zeitzone erwarten

wir sollten alle "web" componenten wie forms und controller durchgehen und uns da nochmal überlegen ob das passt was wir machen.

repo: synyx/urlaubsverwaltung


text:
Archunit for package cycle detection

This PR introduces ArchUnit
First small step is to ensure no cycle between absence and sicknote slice

@rjayasinghe @honnel kümmert ihr euch um diesen Branch noch?

Was passiert mit diesem PR? Welchen Status hat er?

I thought that we had merged this one in our last architecture workshop. If this has not happened yet and we agree that we need the changes we should merge as soon as the failed checks are clarified and fixed.

I thought that we had merged this one in our last architecture workshop. If this has not happened yet and we agree that we need the changes we should merge as soon as the failed checks are clarified and fixed.

kümmerst du dich darum?

I could but only next week. Vacation first. 😌😎

IMHO this can be merged now. As mentioned in the last commit message - fixing the failing archunit tests would be a separate action. Not sure about the failing check in travis-ci.

authors: derTobsch rjayasinghe


text:
Fix sparse morph targets

Fixes #280 by checking the bufferView index before setting the target.
Please take a look @syoyo!

Awesome!
Do you have any minimal glTF file with sparse morph target feature for regression test?

@syoyo Yes, I think this one would work:
singleBlendshapeCube_sparse.zip

@rbsheth Thanks! Confirmed I can reproduce the issue. So merged the PR!
Can I add your singleBlendshapeCube_sparse.zip to https://github.com/syoyo/tinygltf/tree/master/models for regression tests?

@syoyo Great! Yes, you can add that file to the tests. 😄

@rbsheth Thanks! Added to here: https://github.com/syoyo/tinygltf/tree/master/models/SparseMorphTargets-issue280

@rbsheth bufferView could be 0, so add an fix: https://github.com/syoyo/tinygltf/commit/91da29972987bb4d715a09d94ecd2cefd3a487d4

authors: rbsheth syoyo

repo: syoyo/tinygltf


text:
Create A CD pipeline from repo to host

Off to an awesome start! Use a service like Azure static web apps or Netlify to intergrate with your dns and host your static content. They’re free and you will learn continuous delivery best practices.

I have used both Cloudflare pages and Netlify, they are both very good and free. Haven't got a chance to test Azure static sites

license: WTFPL


text:
fix(si): Change the si binary to not expose unnecessary ports

We don't need to expose specific ports - we only need ports for
web, sdf and jaeger
docker ps -a
CONTAINER ID   IMAGE                        COMMAND                  CREATED         STATUS         PORTS                                                                               NAMES
78392dab00d2   systeminit/web:stable        "/usr/local/bin/web"     2 minutes ago   Up 2 minutes   0.0.0.0:8080->8080/tcp                                                              local-web-1
a2826dff3cd7   systeminit/sdf:stable        "/sbin/runuser -u ap…"   2 minutes ago   Up 2 minutes   0.0.0.0:5156->5156/tcp                                                              local-sdf-1
18fefe7fca44   systeminit/pinga:stable      "/sbin/runuser -u ap…"   2 minutes ago   Up 2 minutes                                                                                local-pinga-1
9cc11241dda6   systeminit/veritech:stable   "/sbin/runuser -u ap…"   2 minutes ago   Up 2 minutes                                                                                local-veritech-1
030ae10f3500   systeminit/council:stable    "/sbin/runuser -u ap…"   2 minutes ago   Up 2 minutes                                                                                local-council-1
301115117c3c   systeminit/otelcol:stable    "/bin/otelcol --conf…"   2 minutes ago   Up 2 minutes                                                                                local-otelcol-1
4dd0154acd67   systeminit/nats:stable       "/nats-server --conf…"   2 minutes ago   Up 2 minutes   4222/tcp, 6222/tcp, 8222/tcp                                                        local-nats-1
92f9a12e9c68   systeminit/postgres:stable   "/usr/local/bin/entr…"   2 minutes ago   Up 2 minutes   5432/tcp                                                                            local-postgres-1
e61ae1bbae8e   systeminit/jaeger:stable     "/go/bin/all-in-one-…"   2 minutes ago   Up 2 minutes   5775/udp, 5778/tcp, 14250/tcp, 6831-6832/udp, 14268/tcp, 0.0.0.0:16686->16686/tcp   local-jaeger-1

bors merge

repo: systeminit/si


text:
determine css location on serverside

@guybedford
I got a weird use case:
Suppose I want to use nomarlize.css. I installed it via jspm, imported as a module, so that css plugin loads it up on the client.
I make the web application to be isomorphic, so most of the html content would be rendered on the server for the initial load. The user experience kinda sucks as normalize only kicks in after javascript starts running.
So I thought perhaps we can list normalize.css to the header and have it loaded first... But the versioning is killing me. Plus if this system is used as a framework.. there may be more than normalize.css that should be loaded, right?
Currently I solved the issue by loading system.js in node, then loads the jspm config file so get all the maps. Then I hacked the plugin-css to return the file path of the module when I do import on the server side:
System.import('normalize.css/normalize.css!').then(function (filePath) {...});

This way I can dynamically list the css files to the html head, without manually book-keeping the versions.
What do you think of the use case here? Cuz currently it feels so much like a hack that could break someday...
btw, how does System.locate work? I can't seem to find any documentation on it.

@u9520107 this use case is designed for in SystemJS builder - use the trace API at https://github.com/systemjs/builder#example---exclusion to get the full dependency tree, then just pluck out the CSS files, and you have all the info you need to drop the right link tags in the head. For an example app doing this see https://github.com/Bubblyworld/zygo-server/blob/master/lib/render.js#L24.

@guybedford Thanks, this is pretty cool really. But I noticed that the trace contains a lot of data, and the source codes. Even after i trashed the trace object, the builder itself seems to keep a copy of loaded information. The information could be accessed via builder.loader.loads.
For this use it's like unnecessary data to be kept in memory. Is there a way to clean up the loader?

repo: systemjs/plugin-css


text:
Use Node.js official Docker image

Alpine Linux 3.8 の Node.js バージョンが古く、動作環境の条件を満たしていない。
Related to #2997
Resolve #3242
ref: https://pkgs.alpinelinux.org/packages?name=nodejs&branch=v3.8

@AyaMorisawa How about this?

👍

authors: acid-chicken syuilo

repo: syuilo/misskey


text:
String cannot be resolved to a type

I am java fresher, I just clone and run mvn spring-boot:run, and got error
"String cannot be resolved to a type"
I am using open-jdk 11

@linchen2chris Hi, I can't reproduce this. When I start the project via Maven with OpenJDK 11.0.2 I have no problems. I downloaded the JDK from http://jdk.java.net/archive/
When you execute the command "java --version" in your console what does it say?

Closed this one due to inactivity.

repo: szerhusenBC/jwt-spring-security-demo


text:
Improvement for useMenuState hook

Suggestion
Hi @szhsin. Thank you for the last update and this awesome library. After I played with it more I spot a nice improvement that we can add to it in order to have less boilerplate at the end user. This improvement is for the useMenuState hook. Shortly, for my case, I needed a pop-up which can be triggered by a "more options" button or at the right click for the context menu. This behaviour with the current implementation needs 1 ref and one state with the X - Y position. What I did to improve this is to create a custom hook and wrap the useMenuState with it.
type Point = {
  x: number;
  y: number;
};

const useContextMenu = (options: MenuStateOptions) => {
  const [menuProps, toggleMenu] = useMenuState(options);

  const [anchorPoint, setAnchorPoint] = useState<Point>();
  const anchorRef = useRef<Element | null>(null);

  const setAnchor = useCallback((value: Element | Point | null) => {
    if (value === null) {
      anchorRef.current = null;
      setAnchorPoint(undefined);
      return;
    }

    if (value instanceof Element) {
      anchorRef.current = value;
      setAnchorPoint(undefined);
      return;
    }

    setAnchorPoint(value);
    anchorRef.current = null;
  }, []);

  return [
    { ...menuProps, anchorPoint, anchorRef: anchorRef.current ? anchorRef : undefined },
    toggleMenu,
    setAnchor
  ] as const;
};

Example of use case
  const [menuProps, toggleMenu, setAnchor] = useContextMenu({ transition: true });

  const moreOptionsClickHandler = useCallback(
    (e: React.MouseEvent, id: string) => {
      setFocusedTimelineId(id);
      setAnchor(e.currentTarget);
      toggleMenu(true);
    },
    [toggleMenu]
  );

  const contextMenuHandler = useCallback(
    (e: React.MouseEvent, id: string) => {
      e.preventDefault();
      setFocusedTimelineId(id);
      setAnchor({ x: e.clientX, y: e.clientY });
      toggleMenu(true);
    },
    [toggleMenu]
  );

  const menuItemClickHandler = useCallback(
    (action: string) => console.log(action, focusedId),
    [focusedId]
  );

  const closeContextMenuHandler = () => {
    toggleMenu(false);
    setFocusedTimelineId("");
  };

return (
<>
  <button ref={setAnchor}>Attach anchor with ref</button>
  <button onClick={(e) => moreOptionsClickHandler(e,123)}>More options</button>

 contextMenuHandler(e,123)}>Right click to open context menu

  <ExampleContextMenu
          {...menuProps}
          offsetX={-10}
          offsetY={15}
          align={menuProps.anchorRef ? "end" : "start"}
          onItemClick={e => menuItemClickHandler(e.value)}
          onClose={closeContextMenuHandler}
   />
</>
);

The gains
The main gain here is the easier management of the menu anchor. Also, the end user can give a coordinate or ref as the anchor and the menu will adapt to it. That will lead to less micromanagement from the final user.
I hope you will consider interesting this approach, also if I didn't explain something correctly please let me know and I will try to come up with more details. Thank you again and have a nice week!

Hi @panciumihai ,
Thanks again for your feedback and PR as well.
After assessing the problem and proposed solution, I noticed the following issues:

Using a menu as a dropdown and context menu at the same time, and allowing user to dynamically switch between the two is not a day-to-day usage of the library. The use case might not be common enough to warrant an implementation/API within the library itself. This specific case could be easily implemented in the user space if required.
From the API perspective, the proposed solution makes the API more coupling and less flexible:
To use the ControlledMenu component, two categories of props are needed:

state

Can be a plain state when menu transition is not needed https://szhsin.github.io/react-menu#managing-state
or
useMenuState  when transition is needed https://szhsin.github.io/react-menu#use-menu-state

anchor

anchorRef as a dropdown menu
or
anchorPoint as a context menu
These are four APIs which are small and de-coupled and can be freely composable at user's discretion, e.g:

To build a dropdown menu without transition: use a plain state and anchorRef
To build a context menu with transition: use useMenuState and anchorPoint
To build a dropdown/context menu with transition (like your use case): use useMenuState, anchorPoint and anchorRef
...and more possible combinations of API usage as per user's requirements.

When we design the API for a library, we aim to keep it less coupled and more composable to offer greater flexibility. Composable APIs are also tree-shakable during bundling process. The proposed change in your PR is kind of doing the opposite, it couples three of the four APIs into one hook which forces a user to use both anchorPoint and anchorRef even if only one is needed in the most cases.
Hope my writing makes sense and feel free to share your thought if you have any concerns.

Hi @szhsin,
Yeah, I got your point. In fact, that hook is called useMenuState which handles only the state of the menu. I thought it is a very common use case but it might be not. We can cancel that PR but I think it's worth it to add that custom hook implementation to the documentation. It is useful when you have cards with a context menu and a more options button.
One more thing, don't know exactly if it is a bug. Please let me know if I should write an issue for it. When I used useMenuState({transition: true}). The transition is not working for the submenus of that ControlledMenu, as a fix, I added the transition={true} field on the ControlledMenu.
Thank you for the answer, I'm learning nice things from your library. It's nice structured

I agree it's worth adding the custom hook implementation to the docs. As this is not a common scenario and sometimes might be even a confusing use case, it is best to add a side note to the context menu doc section with a link of a code sandbox example.
Also, I noticed in your example the ref is mutated. This is error-prone as mutating ref doesn't cause re-render and updates could get ignored. It might work for you because the anchorPoint is also updated which triggers a re-render anyway.
In addition, the value instanceof Element condition checking doesn't work.
Here is an example that works for me: https://codesandbox.io/s/usecontrolledmenu-9u7tol
Regarding your question about transition, it is intended as useMenuState only has effects on the ControlledMenu that uses its return value. Both the Menu and SubMenu are uncontrolled components (which manages state and transition internally) and the transition option is set using props on the root menu component.

Yeah, you are right. I use TypeScript for the current project and didn't spot the issue with value instanceof Element. I will use your checks instead because they also work for JS. Thank you for the example and the answer about transition.

authors: panciumihai szhsin

repo: szhsin/react-menu


text:
Cannot set custom mongoose.Promise when using Typegoose

I'm using typegoose 3.6.0 with mongoose 4.13.0.
Setting mongoose.Promise doesn't work when using Typegoose, even if setting it everywhere I import mongoose. As a result (I'm assuming) the mongoose promises are never executed. Removing Typegoose solves the problem.
Eveywhere I import mongoose:
const mongoose = require("mongoose")
(<any>mongoose).Promise = global.Promise;

Defining the model:
export enum Role {
    USER = "user",
    CONTRIBUTOR = "contributor",
    ADMIN = "admin"
}

export class UserProto extends Typegoose {
    _id: mongoose.Types.ObjectId;
    createdAt: Date;
    updatedAt: Date;

    @prop({ enum: Role, default: Role.USER })
    role: Role;
}

export const User = new UserProto().getModelForClass(UserProto, { schemaOptions: { timestamps: true }});

"in save" is never logged
let user = new User({role: Role.USER});
user.save().then((doc) => {
      console.log("in save");

      return doc.toObject();
    }).catch((err) => {
      console.log("error");
    });

i got the same issue,  that's because in node_modules/typegoose, it has its own mongoose dependence。in your code， mongoose is different from  typegoose used from its own dependence.
you can delete the mongoose under node_modules/typegoose/node_modules to solve this.or use typegoose as local module, delete mongoose dependency. and do not put typegoose it in package.json.
this solution is not nice, i hope someone can fix this.

I had some similar Problem with the mongoose. It didn't open the correct connection to the mongo-db and always told me to use not the default mongoose-Promise.
I fixed it with forwarding an existing mongoose model to typegoose.
new User().getModelForClass(User, { existingMongoose: mongoose });

and setting the correct promise (<any>mongoose).Promise = Promise; is only in my main-app file (where I also open the connection).
Hope this solves your problem.

Yes, passing through the existing mongoose works! Unfortunately I immediately ran into other issues and decided that the benefit of removing redundancy wasn't worth the cost of having another library with it's own complexities and issues so I removed typegoose.

authors: Omegahorus jakobwilkenson woxixiulayin

repo: szokodiakos/typegoose


text:
Issue with colorControl attribute for Matter-compatible light device causing initialization failure

I'm experiencing an error with the home-assistant-matter-hub add-on when trying to initialize a Matter-compatible light device. This issue appears to be related to the colorControl attribute, which fails to initialize due to an HS (hue and saturation) conformance requirement.
System Information:
Add-on version: 3.0.0-alpha.29 (latest)
System: Home Assistant OS 13.2 (amd64 / qemux86-64)
Home Assistant Core: 2024.11.1
Home Assistant Supervisor: 2024.11.3
`[ INFO  ] [ matter.js / Endpoint ]: <anonymous_id>.aggregator.light_awtrix_matrix ready endpoint#: 70 type: OnOffPlugInUnit (0x10a) behaviors: ✔identify ✔groups ✔onOff ✔bridgedDeviceBasicInformation ✔homeAssistant ✔descriptor
[ ERROR ] [ matter.js / Transaction ]: Rolling back initialize<anonymous_id.aggregator.light_awtrix_matrix>#c9 due to error: Behaviors have errors
Caused by: Validating <anonymous_id>.aggregator.light_awtrix_matrix.colorControl.state: Conformance "HS": Matter requires you to set this attribute (128)`
Steps to Reproduce:
Install and configure home-assistant-matter-hub add-on version 3.0.0-alpha.29.
Add a Matter-compatible light device (light_awtrix_matrix in this case) with color control capabilities.
Attempt to initialize the device.
Observe the error in logs related to colorControl attribute conformance.
Expected Behavior: The light device should initialize without errors, with Matter-compliant attributes for color control (hue/saturation) being applied correctly.
Observed Behavior: The initialization fails due to a missing HS conformance attribute for colorControl, resulting in a rollback of the device initialization.
Also happens to other devices after i deleted awtrix device.

Behaviors have errors
at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/endpoint/properties/Behaviors.js:128:21
at all (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/general/dist/esm/util/Construction.js:375:17)
at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/general/dist/esm/util/Construction.js:365:11
Cause #0: Error initializing 277a43992373428da5ae6230c80a0cea.aggregator.light_0x001788010c675a36.colorControl
at crash (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/internal/BehaviorBacking.js:48:13)
Caused by: Validating 277a43992373428da5ae6230c80a0cea.aggregator.light_0x001788010c675a36.colorControl.state: Conformance "HS": Matter requires you to set this attribute (128)
at requireValue (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/validation/conformance-compiler.js:300:13)
at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/validation/conformance.js:13:15
at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/values/StructManager.js:135:13
at Object.change (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/Datasource.js:155:7)
at ColorControl$State.set [as currentHue] (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/values/StructManager.js:105:32)
at applyPatchState (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1113:18)
at ColorControlServer.update (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1311:9)
at ColorControlServer.initialize (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1303:14)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Ahh, and this behavior started with the update to Alpha 29. So maybe it has something to do with it.

Same issue here
Behaviors have errors
      at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/endpoint/properties/Behaviors.js:128:21
      at all (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/general/dist/esm/util/Construction.js:375:17)
      at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/general/dist/esm/util/Construction.js:365:11
      Cause #0: Error initializing 02ef6e4c0bdf4eb8a78a85f442104c61.aggregator.light_philips_hue_lightstrip_master_bedroom.colorControl
        at crash (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/internal/BehaviorBacking.js:48:13)
      Caused by: Validating 02ef6e4c0bdf4eb8a78a85f442104c61.aggregator.light_philips_hue_lightstrip_master_bedroom.colorControl.state: Conformance "HS": Matter requires you to set this attribute (128)
        at requireValue (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/validation/conformance-compiler.js:300:13)
        at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/validation/conformance.js:13:15
        at file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/values/StructManager.js:135:13
        at Object.change (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/Datasource.js:155:7)
        at ColorControl$State.set [as currentHue] (file:///usr/local/lib/node_modules/home-assistant-matter-hub/node_modules/@matter/node/dist/esm/behavior/state/managed/values/StructManager.js:105:32)
        at applyPatchState (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1113:18)
        at ColorControlServer.update (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1311:9)
        at ColorControlServer.initialize (file:///usr/local/lib/node_modules/home-assistant-matter-hub/dist/backend/cli.js:1303:14)
s6-rc: info: service legacy-services: stopping

This is a duplicate of #134, lets keep track over there.

authors: DJBenson steuerlexi t0bst4r


text:
Could this tool be improved to warn new devs about potential bad patterns and leaks in Astro?

I think I found a way to leak variables to the client in Astro using Islands with client:only...

Throw if non-client variables are leaked inside props. Obviously this allows server variables if code is run on server to generate HTML. However now I can just add a server variable as an prop for an UI Component and it will show up in plain text in the HTML. This is an leak, which should be prevented.
If I import the validation function inside a UI Component and then use client:only island, I will get errors and no render if I try to access an server variable, which is expected. But the validation function is in the js island chunk. So some can open dev tools, look at the js chunk and find the variables.

Originally posted by @alexanderniebuhr in https://github.com/t3-oss/t3-env/issues/60#issuecomment-1551645066

I'm not sure if I understand it correctly, it would be good if you can create a small example repo that can reproduce the problem that you describe.
There's always a way to leak ENV with/without t3-env. For instance, if you try to access a server-only ENV on server then pass it to client-side, this will leak the env for sure.

For instance, if you try to access a server-only ENV on server then pass it to client-side, this will leak the env for sure.

That's actually the case I tried to describe with the first bullet. I am wondering if there is a way to at least warn the user about this. I am a more advance user and know the patterns to avoid this, but as I am currently working on educational content for new-comers. I wanted to include t3-env, and it would be great if the tool can not experienced devs about bad pattern or potential leak either in SSR Html or serialised component props.
Not sure if it is feasible, but maybe the tool could somehow parse and check if the env is accessed in a way, which could leak.

Not sure if it is feasible, but maybe the tool could somehow parse and check if the env is accessed in a way, which could leak.

Well, the tool kinda did, but not quite. It throws an error if you try to use a server env on client, but of course that's not enough to prevent people from leaking the env.
Maybe this is something that ESLint can help, but again there's too many ways/patterns to leak server env, which I think this is something people should really know and learn how to prevent it. But I agree with you that it would be good if the tool can prevent this from the first place.

I dont see how though? ESLint maybe can detect this?

I dont see how though?

In Astro, we should know which parts of the code are SSR. If someone uses env variables in these SSR places, it should check if the user tries to access client or server vars and print a warning, maybe?

Okay, I think I what you are saying now, as I wasn't paying attention to the client:only.
I never use Astro SSR before, but by looking at the docs, client:only will not perform any SSR, but it allow us to inject server env and render the component on client-side. Correct me if I'm wrong @alexanderniebuhr

But have you try to provider the serve context via isServer option?
https://env.t3.gg/docs/customization

Lesson learned: One must build the project, then go to the DevTools and search for their envs on the client, just to be sure. Maybe even inspect the server bundle in dist/server/chunks/pages/ to see if the build-time envs are in place.
Luckily my project has not gone to the production yet. Before any linting plugin exists, just make sure to double check. You can't trust linting tools to go eslint --autofix and expect them to do it correctly forever. Linting tools have limitations too. Users of Astro SSR or any SSR framework, be warned.

Can you explain what variables are leaked and how? The framework shouldn't let server-side variables be defined on the client, no matter what file you're using it in. There is no way i can use process.env.DATABASE_URL on the client, and thus not env.DATABASE_URL either.
What am I missing?

Can you explain what variables are leaked and how? The framework shouldn't let server-side variables be defined on the client, no matter what file you're using it in. There is no way i can use process.env.DATABASE_URL on the client, and thus not env.DATABASE_URL either.
What am I missing?

It's actually a little bit of an anti-pattern: if you use Vite's define and use the defined thing in t3-env.ts, then that thing will be included both in the client and the server. The purpose was to define build-time server-side variables by defining process.env.XXX with something so that Vite will go replace it at build time, but actually you can just do that and use import.meta.env.XXX instead of using process.env.XXX or whatever you defined in Vite's define.
Actually that has nothing to do with t3-env at all. Just a Vite thing. I wanted to validate that at build time via t3-env, but that isn't related to the above "leak" too much.
The second "leakability" is rendering the server variables in the HTML, which can happen everywhere, not just client:only. You can just read it in the Astro's frontmatter and render it.

Can you explain what variables are leaked and how?

As far as I can tell, if you setup everything correctly nothing is leaked per definition. But you can use process.env.DATABASE_URL in code which is server-side rendered and on the server it will replace this with the raw value. This raw value is sent to the client and rendered from HTML. This issue pivoted to discussion a potential solution to warn users about this.

Ok so the same would be true for RSC if you store a value from env to a variable and passet as prop. Same can be true if you return a value in an api endpoint.
I dont think its the job of t3-env to present this. Maybe we can make a @t3-env/eslint-plugin that can analyze the code and see if a pattern like this is present and warn about it? Would be a pretty cool thing

Ok so the same would be true for RSC if you store a value from env to a variable and passet as prop. Same can be true if you return a value in an api endpoint.

Correct!

I dont think its the job of t3-env to present this. Maybe we can make a @t3-env/eslint-plugin that can analyze the code and see if a pattern like this is present and warn about it?

Agree, that it would be pretty cool to have and it will be a lint warning instead of an actual thrown error. However not sure if an eslint plugin would be the best solution. Not everyone uses eslint and I would like if it is one tool for env vars in the future.
I wonder if this linting task could be included in t3-env as an opt-in configuration option? So it can be chosen to be used and it will offer an one-tool solution for environment variables.

authors: alexanderniebuhr chungweileong94 intagaming juliusmarminge


text:
Frozen column

Hi!!
I am working with your grid and I need some frozen  columns when I use the overflow-x. Is it posible do this?
Thanks!!!

Hi!
Frozen columns are not supported. The easiest way is to use two grids one next to the other. The first should not have horizontal scrolling, while the second will be scrollable.

OK!!! Thanks!! I try it!

There is a plan for frozen columns?

@michaelsogos, this issue has some insights https://github.com/tabalinas/jsgrid/issues/105

Hi.
Kindly.
Thanks for providing simple & powerful grid.
Freezing columns provide good feeling user experience. Most of the time we used one grid in one page.
According to #105 issue, when user put a grid in a page this code work correctly, but when use more than one grid, it didn't work correctly. In other word, the first one of all grids in the form work correctly in particular when applying freezing to all grids.
What is your idea?
Thanks.

authors: adri21112 michaelsogos saeedallahyari tabalinas

repo: tabalinas/jsgrid


text:
How do I capture the filter column and filter value in the controller

Hi there,
I'm trying to get the server side filtering to work, our server side script takes parameters: table_name, index, size, sort_column_name, sort_column_order, filter_column_name, filter_column_value. How can I capture the filter parameters from JsGrid in the controller, so I can pass them to the server side script?
Thanks,
David
`$("#jsGrid").jsGrid({
    height: "auto",
    width: "100%",

    filtering: true,
    sorting: true,
    paging: true,
    pageLoading: true,
    autoload: true,
    pageSize: 25,
    clearFilterButton: true,
    controller: {
        loadData: function(filter) {
            var d = $.Deferred();
			var sortField = '';
			if (typeof filter.sortField !== 'undefined') {
 				sortField = filter.sortField;
			}
			var sortOrder = true;
			if (typeof filter.sortOrder !== 'undefined') {
				if (filter.sortOrder === 'desc') {
					sortOrder = false;
				}
			}
			$.ajax({
			url: 'myURL',
			type: 'POST',
			data: JSON.stringify({
                                    method:"getStore",
				params:[
                                     TABLE_NAME,
                                     filter.pageIndex,
				 filter.pageSize,
				 sortField,
				 sortOrder,
                                     FILTER_COLUMN, //where can I get this
                                     FILTER_VALUE // and this one?
                             ]}),
			contentType: "application/json; charset=utf-8",
			dataType   : "json",
			success    : function(){
			}}).done(function(response) {
            	d.resolve({ data: response.result.items, itemsCount: 200 });
            });

            return d.promise();
        }`

All filter fields coming within filter parameter of the loadData.