בקשת תכונה: קישור לכותרת ולא לטקסט כאשר משתפים ל-discord PWA

יהיה ממש נחמד אם קישורים ישותפו לכותרת במקום (רק) לגוף הפוסט, כך שהכותרת תאוכלס אוטומטית בדיוק כמו שזה קורה אם עושים את זה בתוך אתר.

האם יש סיבה כלשהי לכך שגוף הפוסט הוא היעד?

לייק 1

האם תסכים ל-PR כאן או שיש סיבה שבגללה זה נעשה באופן זה?

@Falco באיזה PR הוכנסה תכונה זו (ביקרתי אך לא הצלחתי למצוא אותה)?

This been a loooooong time ago, but won’t this break when you aren’t sharing a link but a textual content?

At least you’d had to detect if the sharing text is a link and send it to the proper field.

לייק 1

Yeah, that’s presumably more challenging because aren’t you just GETing a URL e.g. https://blah.com/new-topic? ...

But happy to take a look

לייק 1

אם רוב האתרים שולחים רק URL בימינו, הייתי שמח עם השינוי.

לייק 1

I’ve found the code :detective: and I’ll take a look if we can handle both … but agree URL’s are probably sent 99% of the time, so worth considering …

לייק 1

OK I’ve worked out how to support both:

  • text shares will go to body
  • titles go to title
  • link shares will go to title (and then render as a fully expanded title and in the body a nice onebox upon instantiation with all that comes with that including topic list previews)

Currently the update is in a working plugin:

I’ll submit this as a PR as really a no brainer.

Tested this on both Android and Windows (Edge) PWAs and seems to work great.

לייק 1

PR is here:

תזכורת עדינה @Falco

2 לייקים

אוחד, תודה על הבקשה!

2 לייקים

תודה על הביקורת!

2 לייקים

Confirmed this is working on latest rebuild

Another reason to consider Android over iOS for your next phone :mobile_phone: if addicted to Discourse-land :sweat_smile:

I think we can mark this as Completed?

3 לייקים