אני יודע שהאווטאר של האדם שמחק פוסט היה מופיע בתחתית, אבל עכשיו אני כבר לא רואה אותו. האם זו הייתה בחירה מכוונת בעיצוב?
סיכום מבוסס בינה מלאכותית
The discussion centers around a bug introduced with the recent update to Glimmer components, causing admins to no longer see who deleted a post. Previously, the avatar of the deleting user was displayed. piffy noticed the change and questioned if it was intentional. ondrej confirmed it was easier to identify the deleter with the previous display. Moin investigated the code and found the relevant code still exists, suggesting a broken implementation. They provided code snippets and a screenshot of their attempts to restore the functionality, but couldn’ t get the avatar to display. Michael12 built on Moin’s findings, suggesting that @post.deleted_by might not be correctly passed to the component and proposed checking the API response. Moin requested specifics on Michael12’s tweak and agreed with the API suggestion. Ultimately, saquetim identified it as a bug and provided a fix through a pull request (saquetim, https://github.com/discourse/discourse/pull/3330).
אני מבין למה אתה מתכוון. יותר קל לראות מי מחק את הפוסט מהפוסט עצמו, בניגוד לללכת ללוגים.
I don’t think it was an intentional change. The code is still there. I think something broke when the post widgets were updated to Glimmer components.
When I change this to
{{#if @post.deleted_at}}
and also edit line 14
{{formatDate @post.deleted_at format="tiny"}}
I am able to restore most of it.
But I wasn’t able to make the avatar work. Based on
I thought it would be
<UserAvatar @size="tiny" @user={{@post.deleted_by}} />
but that didn’t work.
קופץ פנימה, תודה על הפירוט המעמיק, מוין. ניסיתי שינוי דומה ונתקלתי באותה בעיה עם אי-הצגת האווטאר. נראה ש-@post.deleted_by לא מועבר כראוי לקומפוננטה, למרות שלמודל יש את המאפיין deleted_by. אולי זה לא נכלל בסריאליזר של הפוסט או לא נרשם כראוי דרך שכבת הקומפוננטות של Glimmer? אולי כדאי לבדוק אם deleted_by חשוף בתגובת ה-API עבור הפוסט. אם לא, זה יכול להסביר מדוע UserAvatar לא מקבל נתוני משתמש. רק מחשבה. סקרן אם מישהו מצא פתרון מלא.
What did you try?
Great idea! Would you do that and share the result?
תודה על הדו"ח המפורט.
זו אכן שגיאה שהוכנסה עם רכיבי Glimmer.
אתקן זאת בהקדם האפשרי.
https://github.com/discourse/discourse/pull/33330
The issue will be fixed by the PR above.
נושא זה נסגר אוטומטית לאחר 4 ימים. לא ניתן להוסיף עוד תגובות.
