تعمل PWA الخاصة بسطح المكتب مع Discourse!

Per Hands-On with Microsoft's New Edge Browser Built on Chromium - Thurrott.com

When it comes to features, Edge has the one critical item that always kept me crawling back to Chrome. If you are on a webpage, you can easily turn it into an app, by clicking the three dots in the top right and clicking install app. This is huge, as it allows me to turn Google Calendar, Tweetdeck, and a few other pages into applications on my desktop that makes my workflow, a lot easier.

:thinking: we should definitely whitelist all Chrome based browsers @falco

8 إعجابات

Looks like Chrome Canary is experimenting with a more in your face install button:

https://twitter.com/henrylim96/status/1110916077519699970

Here is it in Meta when the service worker is working:

13 إعجابًا

Niiiice. We should definitely get this working on Chrome. I like it.

6 إعجابات

We want to get this working, but the last time we tried with the “You are offline” page wasn’t a great experience. Also we had a lot of suggestions about making reading Discourse possible when you are offline.

Using some libraries from GitHub - GoogleChrome/workbox: 📦 Workbox: JavaScript libraries for Progressive Web Apps · GitHub I was able to:

  • Remove the “You are offline” page

  • Make Discourse fallback to cache when a network request fail aka Discourse will allow offline browsing of every previously visited page.

  • Get a perfect score in the PWA Lighthouse audit:

  • Get the “Install Site” on the Desktop working (availiable in Chrome canary for now, will land in stable around August)

    image

Technical Details

The changes are pending in this branch: https://github.com/discourse/discourse/compare/offline

A demo site is running at https://discourse-workbox.muito.ninja/

27 إعجابًا

Here is a demo of Discourse offline browsing on iPad

https://giant.gfycat.com/BlushingGreedyGiantschnauzer.mp4

14 إعجابًا

Can you create topics offline that get synced with the server when the device is back online?

The current changes only affect GET requests, so it will make you able to use the composer, if you ever did it while online.

Discourse already keeps submitting a topic in a persistent “Saving” blue bar, and this doesn’t touch that request, so it should keep the current behavior.

However, getting Discourse to work totally in write mode while offline would require a lot more work and be a long term project involving multiple people. That is not the scope here, which is just enabling installs in Desktop.

9 إعجابات

cc @falco

In Chrome 76, we’re making it easier for users to install Progressive Web Apps on the desktop by adding an install button to the omnibox.

16 إعجابًا

Okay, this is live in Meta for testing now. Please report any crazyness.

Here is Meta install:

6 إعجابات

Is there a flag we can set to tinker with this on our own installations?

4 إعجابات

It’s in the same branch as always here. You could deploy from that branch but it is a lot behind master currently. I can rebase it to master, but I don’t recommend messing with this until it’s proven stable here.

Another cool thing, if you try to use the pwa with a cold cache:

13 إعجابًا

هذا نشط على أحدث إصدار من Discourse tests-passed.

يرجى الإبلاغ عن أي #خطأ في مواضيع جديدة.

12 إعجابًا

تم إطلاق Chrome 76 أمس مع زر الدعوة إلى التثبيت (Install) في شريط العناوين، ويعمل أحدث إصدار من Discourse معه مباشرة دون الحاجة لإعدادات إضافية.

15 إعجابًا

تم التأكد من عمله في Chrome 76 المُطلَق اليوم، بل إن هناك حركة متحركة معقدة نسبيًا في شريط العنوان :exclamation: تجذب الانتباه إليها.

يبدو أن الحركة المتحركة تحدث مرة واحدة فقط لكل نطاق.

تم إصدار هذه الميزة تقنيًا، لكنني ما زلت أعتبرها تجريبية إلى حد ما، لذا سأقوم بإعادة فتح الموضوع.

11 إعجابًا

هل توجد طريقة لإخفاء الأيقونة في شريط العناوين، سواء من خلال Discourse أو من Chrome؟ أنا أفضل استخدام المتصفح فقط، لذا لا أرى فائدة في بقاء هذه الأيقونة ظاهرة إلى الأبد.

من المرجح أن هذا السؤال موجه بشكل أفضل إلى مطوري متصفح كروم، وليس إلينا.

7 إعجابات

لقد بحثتُ في Google حول جانب Chrome، لكن لم أجد أي شيء. لذا، سأقوم بطرح السؤال عليهم.

هل يمكن نظريًا تجاهل هذا الأمر (مثلًا باستخدام localstorage) أو إخفاؤه بشكل دائم بناءً على إعداد في Discourse؟ أسأل لأنني لا أعرف ما إذا كان Chrome يكتشف تلقائيًا ما إذا كان الموقع متوافقًا كتطبيق ويب تقدمي (PWA)، أو ما إذا كان هناك مرونة من جانبكم لعرض الخيار فقط في ظروف معينة.

لأي شخص آخر مهتم، يوجد إعداد في chrome://flags يُسمى App Banners يمكنك تعيينه على Disabled لإزالة الأيقونة في شريط العناوين.

تعديل: في الواقع، يبدو أن الإعداد ذو الصلة هو Desktop PWAs installable from the omnibox.

7 إعجابات

فقط للمعلومات، اليوم على كروم في لينكس (أوبونتو) ظهر لي نافذة منبثقة تقترح عليّ “تثبيت” ديسكورش كتطبيق. شيء مشابه للنوافذ المنبثقة التي تظهر عندما تطلب المواقع السماح بالإشعارات.

هل يحاول كروم الدفع نحو هذا النوع من “التثبيتات”؟

نافذة منبثقة على سطح المكتب!؟

هل تملك لقطة شاشة؟

4 إعجابات