Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve modlog (use showAvatars on all user_inline + possibility to hide new icon from modlog) #1472

Merged
merged 11 commits into from
Mar 4, 2025

Conversation

melroy89
Copy link
Member

@melroy89 melroy89 commented Feb 19, 2025

Goal: Have a very clean modlog if you want to.

  • Currently the modlog was still showing user avatars despite the MBIN_MODERATION_LOG_SHOW_USER_AVATARS is set to false. This PR fixes that.
  • Give the inline user and inline magazine the ability to hide the new icon (enabled by default across mbin)
  • Add only an extra option for the modlog to disable the "new icon" to have a clean modlog (new icon is enabled by default in modlog)

This will now finally give a clean modlog (except for the new icons on users & magazines):

image

If you wish to have icons/avatars again, use the options under "Moderation log". If you wish to have no new icon, you can disable this by the new option to hide the new icon.

The hide "new icon" mod log option (by default its showing new icons), will look like this in the modlog:

image

@melroy89 melroy89 added the enhancement New feature or request label Feb 19, 2025
@melroy89 melroy89 added this to the v1.8.1 milestone Feb 19, 2025
@melroy89 melroy89 enabled auto-merge (squash) February 19, 2025 16:26
@BentiGorlich
Copy link
Member

Why hide the new user icon? This is actually important information especially in the modlog imo

@melroy89
Copy link
Member Author

Why hide the new user icon? This is actually important information especially in the modlog imo

It's an icon that is actually distracting IMO, if you want icons you can show the icons/avatar option in the settings. I only implemented this for inline user and inline magazine btw.

@melroy89
Copy link
Member Author

We could also make an additional setting option for the new icon?

@BentiGorlich
Copy link
Member

We do not hide it anywhere depending on any kind of setting, why introduce it in the modlog? And if we were to introduce another setting will we have a battle over the default again?

We have way too many settings already, I am against introducing new settings. We might consolidate settings with just a general "display icons" setting which switches every avatar and icon on or off. And if you want we can include that icon und that new setting as well, but imo it should be a separate PR, no matter which option you/we may choose

@melroy89

This comment was marked as off-topic.

@melroy89
Copy link
Member Author

I will make it default to show new icons.

@TheVillageGuy
Copy link
Contributor

We have way too many settings already, I am against introducing new settings. We might consolidate settings with just a general "display icons" setting which switches every avatar and icon on or off. And if you want we can include that icon und that new setting as well, but imo it should be a separate PR, no matter which option you/we may choose

I agree there are a lot of settings, but as this is an admin setting (correct me if I am wrong) we could always make an advanced settings category for fine-tuning like this.

I agree with Melroy that the icons make the list look very untidy

image

@melroy89
Copy link
Member Author

I know it's again a sensitive topic (what is not anymore nowadays?), but the new icon was created by you in this PR: #969.

There was no ability to control this new feature within that PR. This PR fixes that as well and makes it by default true everywhere (so there is no impact for you and others).

The new option is only introduced for moderation log, in all other cases it's by default set to true like I said (just like showAvatar: true is also set to true in most cases). Even the default value for the new icon in the moderation log is set to true for you.

@BentiGorlich Are you using the modlog a lot?

@melroy89 melroy89 disabled auto-merge February 19, 2025 17:20
@melroy89 melroy89 added the frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end label Feb 19, 2025
@melroy89 melroy89 changed the title Improve modlog (use showAvatars on all user_inline + hide new icon when showAvatar is false) Improve modlog (use showAvatars on all user_inline + possibility to hide new icon from modlog) Feb 19, 2025
@melroy89
Copy link
Member Author

Now I only need to fix integration tests...

@BentiGorlich
Copy link
Member

but the new icon was created by you in this PR: #969.

You are absolutely right...


We need to create a workflow for changing the UI... UI is a very subjective thing and we should not emd up with every change behind a setting. Basically we need to find something at least most of us are fine with regarding the UI.

An example: I add this icon. Melroy saying that is very distracting in the modlog and then finding the conpromise to not make the icon green.

Again just an example, but something like that

@BentiGorlich
Copy link
Member

but as this is an admin setting (correct me if I am wrong)

No its just a normal theme/appearance setting for the modlog (which everyone can see)

@melroy89
Copy link
Member Author

melroy89 commented Feb 19, 2025

We need to create a workflow for changing the UI... UI is a very subjective thing and we should not emd up with every change behind a setting. Basically we need to find something at least most of us are fine with regarding the UI.

An example: I add this icon. Melroy saying that is very distracting in the modlog and then finding the conpromise to not make the icon green.

Again just an example, but something like that

To by fully transparent here, this the background story: It started small (as you can see at the branch name: use_showAvatar_on_all_userinline_modlog) just to cleaning-up the modlog.

Since I notice the avatar icon should be disabled by default in the mod log option, yet it was still showing in the modlog...

This is where I started, then I fixed this issue with user avatars.. And the next thing that popped-up was the still showing icons (the "new" icon). One thing led to another. And now we ended up again with UI changes indeed.

@melroy89 melroy89 force-pushed the use_showAvatar_on_all_userinline_modlog branch from 5b05bb0 to 37b0315 Compare February 19, 2025 21:51
@@ -15,4 +15,5 @@ final class MagazineInlineComponent
public bool $fullName = false;
public bool $stretchedLink = false;
public bool $showAvatar = false;
Copy link
Member Author

@melroy89 melroy89 Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: These variables are defined in the Twig component as well with default values. I believe this showAvatar should be set to true as well, since that is the default option we also have in the GUI. And then its consistent with the showAvatar value as well in UserInlineComponent.php (which was already set to true).

After that, I believe we can remove a lot of unnecessary setting booleans to true in Twig templates, and see if that this works as expected. Since I believe Twig will just use the default boolean from this PHP file.

Copy link
Member

@BentiGorlich BentiGorlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We sure have a lot of uses of the magazine and user inline components huh? :D

@melroy89
Copy link
Member Author

melroy89 commented Mar 4, 2025

We sure have a lot of uses of the magazine and user inline components huh? :D

Yes we have indeed. Maybe a follow-up PR later can clean-up the Twig mess a bit, if we for example would change the default: public bool $showAvatar = false; to true, so all the cases where we now need to set booleans, shouldn't be needed and only when you want to deviate from the default values should need to change the parameter (eg. to false again).

In particularly talking about the user inline component.

@melroy89 melroy89 enabled auto-merge (squash) March 4, 2025 22:49
@melroy89 melroy89 merged commit 9a5add1 into main Mar 4, 2025
7 checks passed
@melroy89 melroy89 deleted the use_showAvatar_on_all_userinline_modlog branch March 4, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants