-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature [Event Creation/Edition] Add possibility to add types to events #318
Conversation
…nto feature/event_types
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Phenomenal pull requests, your contributions are exemplary, keep it up 🚀
enum class EventType(val color: Color, val text: Int) { | ||
FESTIVAL(EventColors.Festival, R.string.event_type_festival), // + Music and Festivals | ||
APERITIF(EventColors.Aperitif, R.string.event_type_aperitif), // + Food and Apéro | ||
NIGHT_PARTY(EventColors.NightParty, R.string.event_type_night_party), // + Music and Festivals | ||
JAM(EventColors.Jam, R.string.event_type_jam), // + Music and Art | ||
NETWORKING(EventColors.Networking, R.string.event_type_networking), // + Apéro and Networking | ||
SPORT_TOURNAMENT(EventColors.SportTournament, R.string.event_type_sport_tournament), // + Sports | ||
SPORT_DISCOVERY( | ||
EventColors.SportDiscovery, R.string.event_type_sport_discovery), // + Sports, Socialising | ||
TRIP(EventColors.Trip, R.string.event_type_trip), // + Travel, Culture | ||
LAN(EventColors.Lan, R.string.event_type_lan), // + Gaming | ||
FILM_PROJECTION( | ||
EventColors.FilmProjection, R.string.event_type_film_projection), // + Art, Culture | ||
FOREIGN_CULTURE_DISCOVERY( | ||
EventColors.ForeignCultureDiscovery, | ||
R.string.event_type_foreign_culture_discovery), // + Culture, Literature | ||
TECH_PRESENTATION( | ||
EventColors.TechPresentation, R.string.event_type_tech_presentation), // + Tech, Science | ||
SCIENCE_FARE(EventColors.ScienceFare, R.string.event_type_science_fare), // + Science, Tech | ||
FOOD_DISTRIBUTION(EventColors.FoodDistribution, R.string.event_type_food_distribuition), // + Food | ||
ART_CONVENTION( | ||
EventColors.ArtConvention, R.string.event_type_art_convention), // + Art, Literature | ||
MANIFESTATION( | ||
EventColors.Manifestation, R.string.event_type_manifestation), // + Culture, Socialising | ||
BOARD_GAMES(EventColors.BoardGames, R.string.event_type_board_games), // + Gaming, Socialising | ||
GROUP_STUDY(EventColors.GroupStudy, R.string.event_type_group_study), // + Science, Tech | ||
OTHER(EventColors.Other, R.string.event_type_other) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on extracting these strings, it's much appreciated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, for my own understanding, what do the comments indicate ? Is it the associated user interests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to remove them, but yes it is the "potential matches" with the user interests that can be used with the custom recommendation system
fun AssociationChips( | ||
associations: List<Pair<Association, MutableState<Boolean>>>, | ||
fun <T> Chips( | ||
items: List<Pair<T, MutableState<Boolean>>>, | ||
getName: (T) -> String, | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clever use of genericity, well done 🚀
EventTypeOverlayRow( | ||
pair, | ||
onChange = { | ||
isError.value = copiedTypes.count({ it.second.value }) > 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting the value 3
into a constant to make the code more understandable and maintainable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never (i'll do it as a Chrismas present)
HorizontalDivider( | ||
modifier = | ||
Modifier.testTag( | ||
EventTypeOverlayTestTags.DIVIDER + "$index")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace this by the shorter:
EventTypeOverlayTestTags.DIVIDER + index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good spot !
This PR adds the possibility to add types to events ! This can be done during the Event creation process or when you edit an Event. This feature is reminiscent of the user interests, as they serve practically the same purpose, but for two different objects.
This Feature is especially useful as it is necessary to add event types for the custom recommendation algorithm to work (Which will function on the basis of matching interests and types to compute a score for each event in regard to each user and then sorting the list of events).
Therefore this PR adds: