text:
Differing behaviour between dev and release compilations when updating/rendering RwSignal<Vec<(Fragment, i32)>>

Describe the bug
Hello,
I am currently working on a demonstrative chatting client using leptos.
I have an RwSignal<Vec<(Fragment, i32)>> (Don't judge me), being updated via the following
                                                    val.push((
                                                    view!{cx,
                                                        <>

                                                                {link.inner_text()}
                                                                <Icon icon=IoIcon::IoClose class="h-3 w-3" on:click=move |_| {
                                                                    input_signal.update(|val| {
                                                                        let index = val.iter().position(|(_, id)| *id == link.value()).unwrap();
                                                                        val.remove(index);
                                                                    });
                                                                    (!input_signal.get().iter().any(|(_, id)| *id == link.value())).then(|| {
                                                                        input.set_value(&(input.value().replace(&(link.value().to_string() + ","), "")));
                                                                        input.set_value(&(input.value().replace(&(link.value().to_string()), "")));
                                                                    });
                                                                }/>

                                                        </>
                                                    },item.id)

And rendered here:
              <input type="text" class=move || format!("w-full py-2 px-4 border border-gray-300 rounded-md
                focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500
                text-transparent select-none selection:bg-none {}", if disabled.get() {"opacity-50"} else {""})
                placeholder="Select an option"
                name="other_users"
                _ref=_ref
                on:click=move |_| hidden_state.update(|val| *val = !*val )/>
                             {move || input_signal.get().iter().map(|val| {
                                  val.0.clone() // <--- Here
                              }).collect_view(cx)}

Leptos Dependencies
As requested:
actix-files = { version = "0.6", optional = true }
actix-web = { version = "4", optional = true, features = ["macros", "secure-cookies"] }
actix-identity = { version = "0.5.2", optional = true }
actix-session = { version = "0.7.2", features = ["redis", "redis-rs-session"], optional = true }
console_error_panic_hook = "0.1"
cfg-if = "1"
leptos = { version = "0.3", default-features = false, features = [
  "serde",
] }
leptos_meta = { version = "0.3", default-features = false }
leptos_actix = { version = "0.3", optional = true }
leptos_router = { version = "0.3", default-features = false }
wasm-bindgen = "0.2.87"
serde = { version = "1.0.163", features = ["derive"] }
serde_json = "1.0.96"
getrandom = { version = "0.2.9", features = ["js"] }
serde_urlencoded = "0.7.1"
fancy-regex = { version = "0.11.0" }
validator = { version = "0.16.0", features = ["derive", "phone"] }
lazy_static = "1.4.0"
env_logger = "0.10.0"
web-sys = { version = "0.3.63", features = ["HtmlFormElement", "SubmitEvent", "KeyboardEvent", "Window", "Location", "History", "File", "FileList", "HtmlInputElement", "HtmlLiElement"] }
gloo-net = "0.2.6"
gloo-file = { version = "0.2.3", features = ["futures"] }
tokio = { version = "1.28.1", features = ["rt", "process"], optional = true }
wasm-bindgen-futures = "0.4.36"
sea-orm-migration = { version = "0.11.3"}
async-trait = "0.1.68"
sea-orm = { version = "0.11.3", features = ["sqlx-mysql", "runtime-tokio-native-tls", "with-chrono"], optional = true }
lettre = { version = "0.10.4", optional = true }
askama = "0.12.0"
base64 = "0.21.2"
chrono = "0.4.24"
rand = "0.8.5"
redis = "0.23.0"
argon2 = "0.5.0"
leptos_icons = { version = "0.0.12", default_features = false ,features = ["AiCloseCircleFilled", "HiChatBubbleOvalLeftEllipsisSolidMd", "HiUserCircleSolidMd", "HiArrowLeftCircleOutlineLg", "AiUserOutlined", "AiUserAddOutlined", "HiChevronLeftSolidLg", "BiUserCircleSolid", "HiEllipsisHorizontalSolidMd", "TbPhotoFilled", "HiPaperAirplaneOutlineLg", "LuImageOff", "IoClose", "IoTrash", "FiAlertTriangle"] }
futures-util = "0.3.28"
iter_tools = "0.1.4"
infer = "0.13.0"

To Reproduce
Steps to reproduce the behavior:

Clone the following link
Run docker build -t zing .. This may take 10-15 minutes to build depending on your system.
Run docker run -p 8000:8000 zing
Create 3 accounts with valid email addresses as you will need to validate your email.
Visit this link and click the group chat icon adjacent to the "messages" header.
Select the other two users you have created and click on create. You will need to reload after this as I have not yet created an appropriate update signal.

Expected behavior
The expected behavior is that within the first image (Dev build).
The unexpected behavior is that within the second image (release build).
Screenshots

Additional context
The component is the GroupChatModal on line 1295 of the following link.
If I fix this issue, I will post the fix.

Thanks for this very detailed report!
The issue almost certainly has to do with the way you are cloning and reusing the fragment, I agree.
I'd recommend trying two things:

Is it possible for this to be an RwSignal<Vec<(HtmlElement
, i32)>> instead? i.e., to simply drop the wrapping <></> fragment around the
 you are using? If so, this would likely work correctly.
It's worth checking whether this is an issue that's been fixed between 0.3 and the current main release by updating from 0.3 to a dependency on git main.

Otherwise, a minimal reproduction that doesn't require a 10-15 minute build process, creating user accounts, etc. to set up will make it more likely I'll get to this sooner.

Ah, I see.
Is there a difference between the implementation of Fragment and other view elements at compile?

Yes. Fragments are backed by a regular web DocumentFragment, which are somewhat tricky to work with. (Although honestly, all DOM elements are hard to deal with). Appending a DocumentFragment to the DOM somewhere moves its children out, so we have to gather them back in if you unmount it and move them somewhere else. It's possible there's an edge case that's missed here somewhere, and the discrepancy between debug and release mode suggests that's the case, but it's also just true that fragments are trickier than regular elements.

Ok,
I have found a solution, but it points to an issue within the intricacies within the implementations of collect_view(cx).
A slight modification to the initial implementation has been introduced from:
{ move ||
    input_signal.get().iter().map(|val| {
        val.0
    })
.collect_view(cx)}

to:
                     <For
                       each=move || input_signal.get()
                       key=|input| input.1
                       view=move |cx, item: (HtmlElement
, i32)| {
                         view! {
                           cx,
                             {item.0}
                          }}/>

seems to have fixed the issue.

Here's a simpler reproduction, for my own purposes in addressing this one:
#[component]
fn App(cx: Scope) -> impl IntoView {
    let count = create_rw_signal(cx, 0);
    let frags = create_rw_signal(cx, vec![]);

    view! { cx,
        <button on:click=move |_| {
            count.update(|n| *n += 1);
            frags.update(|f| f.push((
                view! { cx, <>{count.get()}</> },
                count.get()
            )));
        }>"+1"</button>

            {move || frags.get().iter().map(|val| {
                val.0.clone() // <--- Here
            }).collect_view(cx)}

    }
}

No longer relevant in 0.7

repo: leptos-rs/leptos


text:
Strange behavior of newlines

>>> import mistune
>>> markdown = mistune.create_markdown()
>>> markdown('foo\n  bar')
'
foo\n  bar
\n'
>>> markdown('foo \n  bar')
'
foo \n  bar
\n'
>>> markdown('foo  \n  bar')
'
foo
\n  bar
\n'

I believe this is incorrect. The output should have a  between those two lines always, it shouldn't depend on two spaces before newline.

I'm using version 2.0.0a4 btw.

This is correct.
line break

When you do want to insert a  break tag using Markdown, you end a line with two or more spaces, then type return.

Oh. Ugh. https://stackedit.io/ doesn't follow that, nor https://dillinger.io/, or https://markdown-editor.github.io/, and not github either:
foo
bar
baz
Maybe a plugin/option for this might make sense I guess. Depends on usage. I want to use mistune for a forum/wiki, and then it is very confusing and bad doing what the markdown spec says. Just pasting some python code into a comment field would mangle it badly.

@boxed I guess it depends on your usage. Because for me this is the opposite. I'm using this feature on my own system. The GFM (GitHub Flavored Markdown) behavior seems also to mandate that.

For stackedit, this is configurable.
for dillinger I filed an issue
for markdown-editor, the issue was closed, because it was saying it was behaving the right way.

This can be done with a custom InlineParser right now. But I think it would be good to make an option for it.

I've added hard_wrap back into the master code.

source: gharchive/issue

authors: boxed karlcow lepture

repo: lepture/mistune

license_type: permissive

license_source: bigquery


text:
Doubt？

Do you support online video conversion? For example, the m3u8 online format

Hello,
Gifcurry only supports editing local files.
:+1:

repo: lettier/gifcurry


text:
LPOS command sends FIRST instead of RANK

LPosArgs uses FIRST instead of RANK causing a syntax error
"RPUSH" "mylist" "a" "b" "c" "1" "2" "3" "c" "c"
"LPOS" "mylist" "c" "COUNT" "2" "FIRST" "-1"
> ERR syntax error
"LPOS" "mylist" "c" "COUNT" "2" "RANK" "-1"
> [7,6]

Please rename LPosArgs.first to LPosArgs.rank and send the RANK option if present.
Commit https://github.com/redis/redis/commit/a5a3a7bbc61203398ecc1d5b52c76214f5672776 changed the option name.

That's fixed now.

repo: lettuce-io/lettuce-core


text:
lost data

##1951
I tested this issue and found that it was not that only some of the commands were refreshed, but that the commands were executed out of order

can find first set key key-test-20, followed by del key key-test-20
thank you for your reply

I am using the monitor command of redis for monitoring

and the redis cluster I tested was a single node

When using Redis Cluster, you need to make sure that all node-connections are established. Otherwise, only a subset of commands will be flushed, because connections are in the state of being initialized.


text:
fix typo in doc

Very useful package. Just saw a typo

Thanks @techgaun! 💟

source: gharchive/pull-request

authors: techgaun whatyouhide

repo: lexhide/maptu

license: mit


text:
correct the orthography profile

The orthography profile is automatic, nobody corrected it manually, but this should be done.

Finished, down from ~100,000 invalid lexemes to zero. https://github.com/lexibank/northeuralex/commit/958353c2a07661493c439e20851fe78b8b674fc2
I stupidly pushed to master, please let me know of problems so I revert/fix, otherwise we can close this. :smiley:

authors: LinguList tresoldi

repo: lexibank/northeuralex

license_source: github-api


text:
Make ObjectStore implement IObjectStore

see Issue on codeplex nr Id #7286
https://sharpsnmplib.codeplex.com/workitem/7286
Make ObjectStore inherit from an Interface: IObjectStore, in order to allow customization of the ObjectStore:
https://sharpsnmplib.codeplex.com/SourceControl/latest#SharpSnmpLib/Pipeline/ObjectStore.cs
This is necessary for applications which do not necessarly know all OID's managed by the SNMP Server. The Current Implementation requires knowledge of all OID's on startup/before requesting the Object.
public interface IObjectStore{
public ScalarObject GetObject(ObjectIdentifier id);
public ScalarObject GetNextObject(ObjectIdentifier id);
public void Add(ISnmpObject newObject);
}

Fixed in #14.

authors: lextm schweinsbauch

repo: lextm/sharpsnmplib


text:
te - NI like Scotland

Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] Is your app/project/product currently shipping and/or have the source code available?
[ ] If an app, does your homepage include links to download the Android and/or iOS apps?
[ ] Are you only including a repo_url if your project is 100% open source? If so, you need to pick the single best GitHub repository for your project, not a GitHub organization.
[ ] Have you picked the single best (existing) category for your project?
[ ] Does it follow the other guidelines from the new entries section?
[ ] Have you included a URL for your SVG or added it to hosted_logos and referenced it there?
[ ] Does your logo clearly state the name of the project/product and follow the other logo guidelines?
[ ] Does your project/product name match the text on the logo?
[ ] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[ ] ~10 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

LGTM

repo: lfph/lfph-landscape