RGJ
(Richard - Communiteq)
12 ديسمبر 2022، 4:33م
1
واجهت هذا للتو. انظر إلى الوقت في النافذة المنبثقة اليسرى عندما أنقر على الأول-الثاني-الأول.
على سبيل المثال، سيكون 2022-12-13T14:00:00Z مثاليًا، على الرغم من أنني قد أتمكن أيضًا من استخدام 2022-12-13T13:30:00Z ؟
يحدث هذا فقط عندما يكون التاريخان في نفس الفقرة، لذا فإن الضغط على Enter قبل “على الرغم من” يحل المشكلة.
جي آي إف
7 إعجابات
لقد عبثت بميزة التقويم ووجدت بعض الأشياء الغريبة، قد تتعلق بالخطأ.
أنا على الهاتف المحمول (آيباد) بالمناسبة.
إعجابَين (2)
ted
(Ted Johansson)
15 ديسمبر 2022، 2:58ص
5
صيد رائع!
عندما أضفنا دعمًا مخصصًا لنطاقات التواريخ، أضفنا أيضًا آلية احتياطية للطريقة القديمة “السحرية” لاكتشافها (أي، هل هناك تاريخان في الفقرة، إذا كان الأمر كذلك، فاعتبرها نطاقًا).
تعتمد هذه الآلية الاحتياطية على التحقق من عدد العناصر الفرعية في الفقرة. عند توسيع النافذة المنبثقة، يتم إضافة عنصر النافذة المنبثقة كعنصر فرعي أيضًا. لهذا السبب توجد نتائج مختلفة عند النقر على تاريخ اعتمادًا على ما إذا كانت النافذة المنبثقة مفتوحة بالفعل أم لا.
جارٍ العمل على إصلاح.
4 إعجابات
ted
(Ted Johansson)
12 يناير 2023، 10:58ص
6
تم إصلاح هذا في PR#19477 .
main ← Drenmi:fix/remove-magic-time-ranges
opened 06:30AM - 15 Dec 22 UTC
### History
In #15474 we introduced dedicated support for date ranges. As par… t of that change we added a fallback of "magic" date ranges, which treats dates in any paragraph with _exactly_ two dates as a range. There were discussions about migrating all such paragraphs to use the new date range element, but it was ultimately decided against.
### What's the problem?
1️⃣ A minor [bug](https://meta.discourse.org/t/timezone-bug/248674) was reported relating to the "magic" date range. If a Tippy was already open when expanding a date, the date would be considered a single date, but if no Tippy was open, it would be considered a range. So expanding the same date could have different results based on the initial conditions.
(The reason this happened is the fallback relies on the number of elements in the paragraph being exactly 2, but the Tippy element was also added as a child of the same paragraph, resulting in 3 children.)
2️⃣ While working on this, I additionally found that using two date ranges in the same paragraph would result in all dates in the paragraph being treated as single dates, rather than being grouped together in ranges.
### How does this fix it?
Firstly, we remove the fallback to "magic" date ranges, as decided. This fixes the 1️⃣ problem.
Secondly, when looking at an element and it's parent paragraph, we now select all date range children and partition them two-by-two. This fixes the 2️⃣ problem.
### In summary
- Single dates are now always rendered as single dates.
- Multiple date ranges in the same paragraph now works correctly.
### In action

5 إعجابات