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

Media Page #40

Merged
merged 53 commits into from Sep 7, 2022
Merged

Media Page #40

merged 53 commits into from Sep 7, 2022

Conversation

imashnake0
Copy link
Owner

@imashnake0 imashnake0 commented Jul 6, 2022

Adds a Media page and other small improvements to the Home page.

Summary of changes:

  1. Refactored MediaQuery.
  2. Ported the response to MediaPage.
  3. Built the UI for MediaPage.
  4. Integrated with SearchBar.

Tested changes:

Works fine.

The media stuff was only used to test the API initially, this will be modified and implemented for the media page(s).
@imashnake0 imashnake0 added enhancement Enhancement feature New feature labels Jul 6, 2022
@imashnake0 imashnake0 changed the title Removed unused code Media Page Jul 6, 2022
@imashnake0 imashnake0 linked an issue Jul 7, 2022 that may be closed by this pull request
4 tasks
Directly copied over some potential fields.
Changed some parameter names to support manga lists.
Toasted "bro".
This toasts the media's id!
This toasts the media's metadata.
Reject Toasting, return to logging.
Added extension to prettify data class strings.
:dev_oreo_hmm:
@imashnake0
Copy link
Owner Author

imashnake0 commented Jul 19, 2022

Just added logging capability, if you tap on any of the media (here, anime), some metadata is logged, e.g.,

Media(
    id=111321,
    idMal=40356,
    title=Title(
        romaji=Tate no Yuusha no Nariagari Season 2,
        english=The Rising of the Shield Hero Season 2,
        native=盾の勇者の成り上がり Season2
    ),
    type=ANIME,
    format=TV,
    status=FINISHED,
    description=The second season of <i>Tate no Yuusha no Nariagari</i>.,
    startDate=StartDate(
        year=2022,
        month=4,
        day=6
    ),
    endDate=EndDate(
        year=2022,
        month=6,
        day=29
    ),
    season=SPRING,
    seasonYear=2022,
    episodes=13,
    duration=24,
    trailer=Trailer(
        id=gMZDGyihTyc,
        site=youtube,
        thumbnail=https://i.ytimg.com/vi/gMZDGyihTyc/hqdefault.jpg
    ),
    coverImage=CoverImage(
        extraLarge=https://s4.anilist.co/file/anilistcdn/media/anime/cover/medium/b111321-3MFjZgG1muls.jpg,
        large=https://s4.anilist.co/file/anilistcdn/media/anime/cover/medium/b111321-3MFjZgG1muls.jpg,
        medium=https://s4.anilist.co/file/anilistcdn/media/anime/cover/small/b111321-3MFjZgG1muls.jpg,
        color=#e4935d
    ),
    bannerImage=https://s4.anilist.co/file/anilistcdn/media/anime/banner/111321-nnetF1qONAcE.jpg,
    genres=[
        Action,
        Adventure,
        Fantasy
    ],
    averageScore=67,
    meanScore=67,
    popularity=121065,
    trending=18,
    favourites=2864,
    tags=[
        Tag(
            id=244,
            name=Isekai,
            description=Features characters being transported into an alternate world setting and having to adapt to their new surroundings.,
            category=Theme-Fantasy,
            rank=96,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=82,
            name=Male Protagonist,
            description=Main character is male.,
            category=Cast-Main Cast,
            rank=87,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=29,
            name=Magic,
            description=Prominently features magical elements or the use of magic.,
            category=Theme-Fantasy,
            rank=85,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=90,
            name=CGI,
            description=Prominently features scenes created with computer-generated imagery.,
            category=Technical,
            rank=74,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=276,
            name=Kaiju,
            description=Prominently features giant monsters.,
            category=Theme-Fantasy,
            rank=73,
            isMediaSpoiler=true,
            isAdult=false
        ),
        Tag(
            id=254,
            name=Kemonomimi,
            description=Prominently features humanoid characters with animal ears.,
            category=Cast-Traits,
            rank=68,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=252,
            name=Revenge,
            description=Prominently features a character who aims to exact punishment in a resentful or vindictive manner.,
            category=Theme-Drama,
            rank=67,
            isMediaSpoiler=true,
            isAdult=false
        ),
        Tag(
            id=23,
            name=Female Harem,
            description=Main cast features the protagonist plus several female characters who are romantically interested in them.,
            category=Theme-Romance,
            rank=66,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=247,
            name=Slavery,
            description=Prominently features slaves,
            slavery,
            or slave trade.,
            category=Theme-Other,
            rank=65,
            isMediaSpoiler=false,
            isAdult=false
        ),
        Tag(
            id=104,
            name=Anti-Hero,
            description=Features a protagonist who lacks conventional heroic attributes and may be considered a borderline villain.,
            category=Cast-Main Cast,
            rank=57,
            isMediaSpoiler=true,
            isAdult=false
        ),
        Tag(
            id=94,
            name=Gore,
            description=Prominently features graphic bloodshed and violence.,
            category=Theme-Other,
            rank=40,
            isMediaSpoiler=true,
            isAdult=false
        )
    ],
    isAdult=false
)

@imashnake0
Copy link
Owner Author

Since I'd have to work on the Figma mock-up next, I might put this on hold until after my finals. Wish me luck! 🤞

@imashnake0 imashnake0 added this to In progress in Animite Jul 19, 2022
Created files for the Media page.
Putting this on hold and removing Hilt and Compose Navigation first instead.
Reviewed release notes and updated Compose and a couple other libraries.
We need to hide the navigation bar somehow.
Needed to hide the navigation bar on the `MediaPage`.
Forgot to include this.
Redundant but whatever.
Everything on top of the tabs.
😩
Longer cross-fade between `Home` and `MediaPage`; le slide between `Home` and `Profile`.
Fixed the weird default crossfade flash.
@imashnake0
Copy link
Owner Author

one_piece_ss

Might make reusable components since we need something similar for the characters list :hmm:.
This works now.
I think it looks better like this?
Added a... row for characters.
@imashnake0
Copy link
Owner Author

Screenshot_20220831-003104

@imashnake0
Copy link
Owner Author

Screenshot_20220903-150224

Compose destinations mfw.
Made it transparent since the bottom of the search bar is sometimes under the keyboard.
@imashnake0 imashnake0 marked this pull request as ready for review September 7, 2022 02:49
This fixes nested navigation but double clicking launches two of the same screen (since `launchSingleTop = false`).
Maybe I should add a divider to make the items' separation more apparent. :hmm:
Added TODOs and completed review.
@imashnake0 imashnake0 merged commit 39619d5 into main Sep 7, 2022
@imashnake0 imashnake0 deleted the media-page branch September 7, 2022 22:38
@imashnake0 imashnake0 moved this from In progress to In review in Animite Sep 8, 2022
@imashnake0 imashnake0 moved this from In review to Done in Animite Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement feature New feature
Projects
Animite
  
Done
Milestones
Awaiting triage
Development

Successfully merging this pull request may close these issues.

Make media clickable
1 participant