سلوك الروابط غير متسق

لم أتمكن من تحديد ما إذا كان السبب يعود إلى إضافة (Assign) أو مكون سمة (Custom Header Links)، لكن نظرًا لأنهما رسميان، قررت تقسيم المسؤولية على نصفين وتقديم هذا التقرير كـ Contribute > Bug

موقع جديد، لا يحتوي إلا على هذه المكونات. تُعد روابط الرأس ضرورية لأن إضافة Assign لا تبدو أنها تضيف خيارات القائمة العلوية مثل “الموكلة إليّ” و"الموكلة للجميع" وما إلى ذلك.

في المرة الأولى التي يتم فيها النقر على أي من هذين الرابطين، يتم عرض المنشورات الموكلة بشكل صحيح. إذا تم النقر على أحدهما بعد الآخر، أو إذا تم النقر على نفس الرابط مرتين، فإن الرابط يتحول من /latest?assigned=me أو /latest?assigned=* إلى /latest، مما يعني أن المنشورات الخاطئة يتم إرجاعها.

لذا، من / أنقر على “مهامي” وأنتقل إلى /latest?assigned=me، ثم أنقر على “جميع المهام” وبدلاً من توجيهي إلى /latest?assigned=*، يتم توجيهي إلى /latest. أيضًا، إذا كنت بالفعل على أي من هاتين الصفحتين وأنقر على الرابط مرة أخرى، فأنا أُوجّه إلى /latest.

v2.3.0.beta5 +200

Can you give your custom header links settings please ?

Sure, they’re:

My Tasks,My Tasks,/latest?assigned=me,vdm,self

and

All Tasks,All Tasks,/latest?assigned=*,vdm,self
إعجاب واحد (1)

Ok looked at it a little bit, I can say for sure it’s not related “Custom Header links” theme component.

You could for example reproduce multiple times when clicking on the assigned tag under a topic:

The issue is probably in Discourse itself, I feel like discourse-assign is generating the correct URL, will dig more later.

إعجاب واحد (1)

I ended up doing two commits:

https://github.com/discourse/discourse-custom-header-links/commit/bfda9d3b50bd8e027024b62aa0b7e68611248073

https://github.com/discourse/discourse-assign/commit/046f1db466d3f6e01a41217c8593001dc66b21ce

This will now make a full reload but will avoid losing query params

6 إعجابات

This commit:

https://github.com/discourse/discourse-custom-header-links/commit/175a027582eac0b95803b3675ea37faf527ae68c

Reintroduces this bug:

It’s not just clicking the same link where the issue presents. Clicking between links with querystrings is fundamentally broken by this change too.

If I click the link for ‘Assigned to Me’ latest?assigned=me and follow it with a click to ‘All Tasks’ latest?assigned=* it instead takes me to /latest.

The alternative, reloading the page, seems like a small inconvenience in comparison.

إعجابَين (2)