Tag-union implementation?

Continuing the discussion from Tags: category restrictions, tag groups, relationships:

I’m interested in building a tag union capability that would mimic how tag intersections are currently implemented (Tag intersections page): essentially the same result as intersections (the default category/Latest view), but doing an OR on multiple tags rather than an AND. I would appreciate any suggestions as a new Discourse developer.

My thoughts (so far) are as follows:

  • Searching on multiple tags via the search page essentially provides tag-union functionality (Does multiple tag search support AND vs OR?). The problem is that I don’t want the search results view – I want the default category page. Could search results be redirected to accomplish this?

  • If search results can’t be redirected, I’m open to attempting a /tags/union/ route (and have been looking into how intersection works). I would prefer to do this via plugin, but I am concerned that that is not something that could currently be accomplished via a plugin. Any suggestions here would be appreciated.

If there is sufficient user interest to add a tag-union capability into the Discourse core, I’d be willing to do it and submit a PR, but I’m hoping to find an alternative. Thanks in advance.

4 إعجابات

Not sure this counts as sufficient user interest, but intending to revive this discussion to see if users/team are interested.

Thoughts? @daniel

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

هل كان هناك أي تحديثات حول هذا؟ سيكون من المفيد جدًا وجود مسار /tags/union.

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

لدينا الآن على الأقل في شكل مسار:

https://meta.discourse.org/?tags[]=screen-reader&tags[]=accessibility

على المدى الطويل، نفكر في بناء واجهة مستخدم لتصفية وفرز قوائم المواضيع بشكل أنظف.

4 إعجابات

أحصل على قائمة مواضيع فارغة عند النقر على عنوان URL المقدم:

هل يمكن أن تكون هناك مشكلة؟

نعم، يحتاج موجه Ember الخاص بنا إلى معرفة هذا المسار (تحية @david)
سيعمل إذا انتقلت مباشرة إلى عنوان URL

إعجابَين (2)

هل أحتاج إلى تنفيذ ./launcher rebuild app للحصول على هذا التحديث على مثيلي المستضاف ذاتيًا؟

سأنتظر حتى نقوم بإصلاح التوجيه من جانب العميل

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

يعد بناء مصفوفات queryParam باستخدام صيغة paramName[] شيئًا خاصًا بإطار عمل الواجهة الخلفية، ولا أعتقد أن Ember يدعمه بشكل أصلي. قد نتمكن من جعله يعمل، لكنني ألقيت نظرة سريعة على التنفيذ من جانب الخادم لمرشح tags ويبدو أننا ندعم أيضًا قائمة مفصولة بمسافات.

لذلك، يجب أن يعمل هذا الرابط بالفعل دون الحاجة إلى إعادة تحميل الصفحة بالكامل: https://meta.discourse.org/?tags=screen-reader+accessibility

إعجابَين (2)

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

على سبيل المثال، إذا كنت في /tag/tag1 واخترت site-feedback من أعلى اليسار. يعرض /tags/c/site-feedback/2/tag1.

مع /?tags=tag1+tag2، فإنه يعيد توجيهي ببساطة إلى /c/site-feedback/2.

هل من الممكن الحصول على هذه الوظيفة؟

أعتقد أن هذا تم طلبه في هذين الموضوعين أيضًا:

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

هذا النوع من الأشياء غير مدعوم في الوقت الحالي، ولكنه شيء نفكر في تحسينه على المدى الطويل

3 إعجابات