App style snap

First of all, thanks for porting this to Svelte! It's really great, my only quibble is the snapping mechanism. It's not as good as it could be. I want to make app UIs that feel as solid as native apps, and it's worth looking at how they do snapping.
Two good examples are VS Code and Apple's Finder. The sidebar's splitter has a (fixed) "minSize". If you keep resizing below that size, you reach a threshold at about half the width of the pane, causing it to collapse (or expand again).
I tried playing around with snapSize and minSize, but apparently the snap mechanism of svelte-splitpanes is the opposite of VS Code and Finder. Instead of snapping to 0 when below a certain threshold, it snaps to minSize when below snapSize. To me, at least, that's not very intuitive. It feels more flimsy than professional UIs.
To fully replicate VS Code style splitpanes, fixed sizes would also have to be supported (discussed in #33). I think it's not just a nice to have. A good use case is exactly that of UIs where the sidebar should be collapsible, while still having a minSize larger than 0.

To be somewhat constructive, how about changing the behavior so that if snapSize < minSize…
<Pane snapSize={5} minSize={10} maxSize={80}>

… it snaps to 0 from 5, while keeping the pane at 10 until then?
That's the behaviour I expected, and would be close enough to native UIs for me.

Hi @joakim !
There were a lot of debate about features and consistency, discussed within a detailed conversation in #26.
In short, this is the idea:
Every existing pane have a minimal size of minSize, meaning it never can be less(unless you remove it completely). The same apply with maxSize, but this is irrelevant for the discussion now(in purpose we decided to make this size irrelevant with respect to snapSize, see the discussion there).
The snap size determines what is the gap between minSize and the current size, such that within this gap, the pane will be snapped. I.e. the snap behaviour is: Snap the pane to the minimal size, if the current size of the pane is less than minSize + snapSize.
So now we know the definitions, I believe that your idea can be implemented simply by doing both:

Set minSize to be 0
Set snapSize to the amount you wish

Meaning, that within the gap of less than 0 + snapSize(=snapSize), the pane will snap to the minimal size (equals 0).
What do you think?

Wish I had seen that issue before :) I understand the rationale behind the snap behaviour now. It does make sense for collapsing adjacent panes of the same type.
Unfortunately, it's not enough to replicate Apple/Microsoft's sidebar snapping. I tried minSize={0} snapSize={10}, which does work, but it's what I'd call flimsy compared to the "benchmark". It's a question of UX. There's a reason Apple and Microsoft's UI designers chose that behaviour. Squishing your sidebar content until it suddenly disappears just feels wrong, almost like a bug.
Maybe adding another size property could make it work with the existing behaviour? stickSize?
<Pane minSize={0} snapSize={5} stickSize={10} maxSize={80}>

When resizing from larger to smaller, you first hit stickSize, making the pane stick to that size (until it snaps). Later you hit snapSize, causing the pane to snap to minSize. That would work just like native sidebars, I think, without breaking existing behaviour. What do you think?

Maybe adding another size property could make it work with the existing behaviour? stickSize?
<Pane minSize={0} snapSize={5} stickSize={10} maxSize={80}>

When resizing from larger to smaller, you first hit stickSize, making the pane stick to that size (until it snaps). Later you hit snapSize, causing the pane to snap to minSize. That would work just like native sidebars, I think, without breaking existing behaviour. What do you think?

Checked again in VS Code and I see your point. This looks overall good to me.
What do you think @orefalo ?
Anyway, we are currently not available to work too much on this project, but I believe we'd like to see PR (including explanation in the docs).

I also wants to mention that if PR is too hard, this can be implemented in the user land by subscribing to pane size events.

I might be able to have a go at a PR eventually, but I can't prioritise it at the moment.

I also want to mention that if PR is too hard, this can be implemented in the user land by subscribing to pane size events.

Oh, it can? I haven't looked into events, I assumed I couldn't affect any behaviours that way. I'll have a closer look then!

You were right, I could made it work in userland. With not too much of a hack either.
I use theme to enforce min-width in CSS when the sidebar is open. I also calculate the "breakpoint" on window resize, to half the minimum width of the sidebar, converted to a percentage. Otherwise, the breakpoint would move when the window is resized.
<script>
  const sidebarMinWidth = 200 // in px
  let windowWidth // in px

  // Calculate "breakpoint" on window resize (half the width of the sidebar,
  // converted to a percentage of the window's inner width)
  let sidebarSnap = 0
  $: sidebarSnap = ((sidebarMinWidth / windowWidth) * 100) / 2

  let sidebarState = 'open'

  const onSidebarResize = (event) => {
    const { size, snap } = event.detail[0]
    if (sidebarState === 'open' && size < snap) {
      sidebarState = 'closed'
    }
    else if (sidebarState === 'closed' && size > snap) {
      sidebarState = 'open'
    }
  }
</script>

<svelte:window bind:innerWidth />

<Splitpanes theme={sidebarState} on:resize={onSidebarResize}>
  <Pane size={0} minSize={0} maxSize={80} snapSize={sidebarSnap} class="sidebar"></Pane>
  <Pane></Pane>
</Splitpanes>

<style global lang="scss">
  .splitpanes.open .sidebar {
    min-width: 200px;
  }
</style>

Demo (with doubleclicking the splitter at the end):
https://user-images.githubusercontent.com/34790/194891000-67358a30-6c57-44df-8afa-5669a3116386.mp4
See it looped here: https://imgur.com/a/8FT5qxJ

You were right, I could made it work in userland. With not too much of a hack either.
I use theme to enforce min-width in CSS when the sidebar is open. I also calculate the "breakpoint" on window resize, to half the minimum width of the sidebar, converted to a percentage. Otherwise, the breakpoint would move when the window is resized.
<script>
  const sidebarMinWidth = 200 // in px
  let windowWidth // in px

  // Calculate "breakpoint" on window resize (half the width of the sidebar,
  // converted to a percentage of the window's inner width)
  let sidebarSnap = 0
  $: sidebarSnap = ((sidebarMinWidth / windowWidth) * 100) / 2

  let sidebarState = 'open'

  const onSidebarResize = (event) => {
    const { size, snap } = event.detail[0]
    if (sidebarState === 'open' && size < snap) {
      sidebarState = 'closed'
    }
    else if (sidebarState === 'closed' && size > snap) {
      sidebarState = 'open'
    }
  }
</script>

<svelte:window bind:innerWidth={windowWidth} />

<Splitpanes theme={sidebarState} on:resize={onSidebarResize}>
  <Pane size={0} minSize={0} maxSize={80} snapSize={sidebarSnap} class="sidebar"></Pane>
  <Pane></Pane>
</Splitpanes>

<style global lang="scss">
  .splitpanes.open .sidebar {
    min-width: 200px;
  }
</style>

Demo (with doubleclicking the splitter at the end):
9REPHpg.mp4

Great! Glad to see.
I would like to see PR that do this with stickSize(with measurements in percentages) however. See the changes of PR #26 for referencing the relevant lines of code.
Assuming this will be created and merged (and solves this issue), your code will be much more simplified, and will only contain the conversion from percentages to pixels on the client side.

See it looped here: https://imgur.com/a/8FT5qxJ
I need to have your frontend designing skills... I only feel comfortable at designing code logic and edge cases.

We each have our strengths and interests :)
Looks like I won't have time to work on a PR any time soon, unfortunately. The workaround works for me.

Thank you for the feedback @joakim
Closing the ticket as workaround proved useful


stack-buffer-overflow at src/game/bg.c:5964 in bgRoomGetNeighbours

Address sanitizer report:
==62418==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xfff8f334 at pc 0x56676ea7 bp 0xfff8f198 sp 0xfff8f188
WRITE of size 2 at 0xfff8f334 thread T0
    #0 0x56676ea6 in bgRoomGetNeighbours src/game/bg.c:5964
    #1 0x5677eaa3 in waypointFindClosestToPos src/game/padhalllv.c:97
    #2 0x5660f75b in chrGoToRoomPos src/game/chraction.c:6109
    #3 0x566107dd in chrGoToPos src/game/chraction.c:7272
    #4 0x566517ea in chr0f04c874 src/game/chraction.c:15893
    #5 0x568c0268 in ai0139 src/game/chraicommands.c:7417
    #6 0x5679c2c7 in chraiExecute src/game/chrai.c:783
    #7 0x56642644 in chraTick src/game/chraction.c:13302
    #8 0x567c9923 in chrTick src/game/chr.c:2441
    #9 0x56a26f3f in propsTickPlayer src/game/prop.c:1921
    #10 0x56762b0b in lvRender src/game/lv.c:1196
    #11 0x56ae7049 in mainTick port/src/pdmain.c:554
    #12 0x56ae7733 in mainLoop port/src/pdmain.c:499
    #13 0x56ae7766 in mainProc port/src/pdmain.c:280
    #14 0x56af0ce6 in main port/src/main.c:89
    #15 0xf7128518 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #16 0xf71285f2 in __libc_start_main_impl ../csu/libc-start.c:392
    #17 0x565e0aba in _start (/home/ax/git/perfect_dark/build/ntsc-final-port/pd.exe+0x3caba)

Address 0xfff8f334 is located in stack of thread T0 at offset 228 in frame
    #0 0x5677e7ee in waypointFindClosestToPos src/game/padhalllv.c:77

  This frame has 15 object(s):
    [48, 60) 'tmppos' (line 190)
    [80, 92) 'sp98' (line 189)
    [112, 128) 'padrooms' (line 155)
    [144, 160) 'tmprooms' (line 191)
    [176, 192) 'padrooms' (line 188)
    [208, 228) 'neighbours' (line 81) <== Memory access at offset 228 overflows this variable
    [272, 312) 'candwaypoints' (line 84)
    [352, 392) 'candsqdists' (line 85)
    [432, 472) 'checkmore' (line 86)
    [512, 572) 'allrooms' (line 79)
    [608, 692) 'pad' (line 111)
    [736, 820) 'pad' (line 154)
    [864, 948) 'pad' (line 187)
    [992, 1112) 'sp250' (line 87)
    [1152, 1272) 'sp1d8' (line 88)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow src/game/bg.c:5964 in bgRoomGetNeighbours
Shadow bytes around the buggy address:
  0x3fff1e10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3fff1e20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3fff1e30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3fff1e40: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1
  0x3fff1e50: 00 04 f2 f2 00 04 f2 f2 00 00 f2 f2 00 00 f2 f2
=>0x3fff1e60: 00 00 f2 f2 00 00[04]f2 f2 f2 f2 f2 00 00 00 00
  0x3fff1e70: 00 f2 f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2 f2
  0x3fff1e80: 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00
  0x3fff1e90: 00 04 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
  0x3fff1ea0: 04 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
  0x3fff1eb0: 04 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==62418==ABORTING

Looking at bgRoomGetNeighbours, there's the line dstrooms[count] = -1; which might be assigning this number one position after the end of the array. The crash occurred when an enemy guard did a roll and crossed a door frame.

Looks like in almost every place where bgRoomGetNeighbours is used, it's passed a number 1 or 2 less than the size of dstrooms for len. But in the place you posted and also in some other places it's passed the full array size instead.
We can fix this either inside bgRoomGetNeighbours or in those specific spots. Don't know which would be best to keep the original behavior intact as much as possible.

Pushed the latter variant. Re-open the issue if you encounter this again.


new timoni module has files listed in the timoni.ignore

looks like 3 files:

timoni.ignore
go.{mod,sum}

Yes these are the new default ignore rules to avoid publishing modules to OCI with files which are not required at runtime.

The problem is that the generate go files (and cue mod setup) would have over written my existing files
if I generated a new timoni module at the root of my existing repository

The timoni mod init mymod . creates a directory with the module name, if the dir exists it should error out. How did you run the command so it ended up overriding files?

The files needed for a Timoni module are listed here https://timoni.sh/module/

What's up with the generated go.mod/sum files then? They are not in the list, I'm not even in a project containing any Go

When you do timoni mod push those Go files are ignored as per timoni.ignore, they are useful to module authors. As an author you should have them in your Git repo to be able to update the Kubernetes definitions https://timoni.sh/module/#kubernetes-types.


[FS] Add WalletSyncFromHeight option to Fed Gateway

See https://stratisplatformuk.visualstudio.com/Sidechains/_workitems/edit/3291.

looks good to me but I'll wait for @codingupastorm @rowandh  on this.

Nice @quantumagi, have you tested it at all?
We'll pick some values to go into the daemons there then this should be good.


How to determine logout of google.

I am implementing google authentication in my website. Now I want to check weather the user has logged out of google or not to proceed further. So, how can I check.
Senario:
In one tab of browser I had opened my Application It is authenticated.
In another tab of browser I had opened google site and I had logged out.
Now I want to redirect my user to google Auth page. How can I redirect. Plz help

That's not how open authentication works.    A user does not logout of Google once you have authenticated a user you have a refresh token and can access there data when ever you like.    It wont matter if they are logged into Google or not.   You will need to work out how to log a user out of your website not Google.
This is not an issue with the client library, for questions relating to application development.   I recommend you ask on stackoverflow.com there are a large number of web developers that i am sure would be happy to point you in the correct direction.


[QUESTION] Deprecated versions

Is it deliberate that 5.0.2 is not marked as depercated?

Are these all deprecated due to security vulnerabilities? https://github.com/dotnet/announcements/issues?q=is%3Aissue+microsoft.data.sqlclient+ only lists two vulnerabilities, neither of which are marked as affecting anything higher than 3.1.5.

Nevermind, I see https://github.com/dotnet/SqlClient/issues/2291 where you flag that the announcement is incorrect.  Makes sense.

I see that 5.0.2 also have be marked as deprecated now


Crash when trying to display Forestry leaves

so i was popping open some chance globes when my game crashed, I have this thing in the mod pack where it tells you what crashed the game and it pops up with forestry and chance globes. it generated a crash log so here it is :D
https://gist.github.com/MasterSloth1/50a193ea296310f53a42980e29fe5707
Forge version - <IP_ADDRESS>08
chance globes - 1.12.2-v1.2
forestry - 1.12.2-<IP_ADDRESS>7
optifine installed
no resource pack

That's not world breaking at all. Your Chance Globe tried to display an item that Forestry didn't allow to display, so Forestry crashed the game. Your world is fine. I don't know whether I can fix this, but for now just exclude Forestry in the mod exclusion list.

my world is gone upon crashing it had removed my level.dat file, but yea thanks ill add it to the excluded list, should i pop over to forestrys github and paste the same thing there???

No, Forestry is not the culprit here. If anything, I need to fix it on my end. My mod was not the reason your level.dat file was removed, I just recreated the crash locally and my test world is still there.

hmm interesting i wonder what done it then because when i looked in the save folder for the world it was almost empty a couple of folders is all that was in there

thanks anyways i hope u get it sorted 😄


add: agtorres3

Description
I added my dev info and the name of the file in the appropriate areas according to the readme file
Related Issues
I was having issues with making a branch, changes were made in the master, I know this isnt preffered practice. Im sorry
Changes Proposed

Checklist

[x ] I have read and followed the Contribution Guidelines.
[x ] All new and existing tests passed.
[ x] I have updated the documentation to reflect the changes I've made.
[x ] My code follows the code style of this project.
[x ] The title of my pull request is a short description of the requested changes.

Screenshots
Note to reviewers

@agtorres3 Thank you so much for your contribution! Your efforts are greatly appreciated and will go a long way in improving our project. Please feel free to share it with others and help us grow even further!


Fix golint warning in labels.go

Signed-off-by: Guangwen Feng<EMAIL_ADDRESS>

Thank you for your pull request. Can you remove the 'if' as it was left as it by design?

Thanks for your review.
Done, PTAL, thanks again.

Thanks!!


Create a config tree per configuration layers

What does this PR do?
Create a config tree per configuration layers. This PR also update the Set method in another commit to handle all layers.

/merge


Convert the key of the stream message to json

Hi
When I use stream with Redis 5 on redisson I get an error of trying to convert the key of the stream message to Json.
Is there any possibility to try to decode only the value to json?
Thanks

You can supply a custom composite codec where the keys are decoded using StringCodec while values are decoded with JsonJacksonCodec.