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

feat: add hideTags option in user settings #3620

Closed
wants to merge 2 commits into from

Conversation

andromidasj
Copy link

Description

This new option will allow for a user to hide the tags that show in a Movie or TV Show details page. If the setting Hide Tags is checked, the tags will not show. If it is unchecked, the tags will show.

Screenshot (if UI-related)

Setting:
image

Before:
image

After:
image

To-Dos

  • Successful build yarn build
  • Translation keys yarn i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

Comment on lines 28 to 36
export interface UserSettings {
discordId?: string;
region?: string;
originalLanguage?: string;
locale?: string;
type UserSettings = Pick<
UserSettingsGeneralResponse,
'discordId' | 'region' | 'originalLanguage' | 'locale' | 'hideTags'
> & {
notificationTypes: Partial<NotificationAgentTypes>;
watchlistSyncMovies?: boolean;
watchlistSyncTv?: boolean;
}
};
Copy link
Author

Choose a reason for hiding this comment

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

I noticed here that we're duplicating code and having multiple sources of truth. This Pick type allows us to honor the types already set for these settings in the UserSettingsGeneralResponse interface. If it's desired to have it typed out explicitly in this file though, we can simply remove what I added and instead add hideTags?: boolean; underneath line 32 of the original code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we should modify any older code unless necessary. The hideTags boolean should suffice.

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good, I'll remove this chunk then!

@andromidasj
Copy link
Author

@OwsleyJr do you know how I can get help with data migration stuff? My understanding is pretty limited in that side of things, and there seems to be some SQL build errors in Cypress like:

driverError: Error: SQLITE_ERROR: no such column: User_settings.hideTags

This new option will allow for a user to hide the tags that show in a Movie or TV Show details page.
@OwsleyJr
Copy link
Collaborator

OwsleyJr commented Oct 6, 2023

@OwsleyJr do you know how I can get help with data migration stuff? My understanding is pretty limited in that side of things, and there seems to be some SQL build errors in Cypress like:

driverError: Error: SQLITE_ERROR: no such column: User_settings.hideTags

Would just need to generate a migration file. You can look in the package.json for the script we use.

Copy link

stale bot commented Mar 13, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 13, 2024
@stale stale bot closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide tags from detail page
2 participants