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

Convert entity sidebars to React #623

Merged
merged 63 commits into from Oct 11, 2018

Conversation

Projects
None yet
3 participants
@mwiencek
Copy link
Member

commented Mar 1, 2018

No description provided.

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch 2 times, most recently from 6707f72 to 6ff94de Mar 26, 2018

@mwiencek mwiencek changed the title Convert entity sidebars to React [WIP] Convert entity sidebars to React Mar 26, 2018

@mwiencek

This comment has been minimized.

Copy link
Member Author

commented Mar 26, 2018

No longer WIP. All of the core entitiessidebars are done now and I've split up the commits. We can do the cdstub, collection, and edit sidebars in a later PR.

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch 4 times, most recently from 4312420 to df0d553 Mar 26, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch 4 times, most recently from b039127 to 8fdd172 Apr 3, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch 2 times, most recently from 42122fd to 40cf464 Apr 23, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from 40cf464 to a9e35f9 May 3, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from a9e35f9 to 09d4abd Sep 5, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from 09d4abd to 81fed68 Sep 24, 2018

Show resolved Hide resolved root/layout/components/sidebar/ReleaseSidebar.js Outdated
Show resolved Hide resolved root/layout/components/sidebar/ReleaseSidebar.js Outdated
Show resolved Hide resolved root/layout/components/sidebar/ReleaseSidebar.js Outdated
Show resolved Hide resolved root/components/CritiqueBrainzLinks.js

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch 6 times, most recently from dcaf284 to 7c29fa7 Sep 28, 2018

@mwiencek

This comment has been minimized.

Copy link
Member Author

commented Oct 5, 2018

This also now converts the collection, edit, and cdstub sidebars, which were the only ones left.

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from 7c29fa7 to 27d4c8d Oct 6, 2018

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from 27d4c8d to d2c111d Oct 6, 2018

mwiencek added some commits Oct 6, 2018

Handle blessed entities in relationship editor
$c->json has allow_blessed and convert_blessed enabled, so we can now
serialize entities that contain blessed objects like cover art.
Fix ExpirationDate component
The component uses different (and probably harder to translate) strings
than the expiration_time TT macro, and wraps the result in bracketed,
which the macro didn't do.

This commit also renames the component to ExpirationTime to match the TT
macro, which makes more sense.
Merge CDStubTOC into CDStub
The basic idea was that CDStubTOC modeled cdtoc_raw, and CDStub modeled
release_raw. But there's no clear reason why these are separate models,
since the tables have a 1:1 mapping (I'm not actually sure why they're
separate tables). You can't submit a CD stub without a disc ID. So these
models only serve to make the code confusing as to when you should
expect which entity.

For example, the CDStub entity class previously had discid and
track_count properties as shortcuts for the indexed search, which didn't
construct a full CDStubTOC in `schema_fixup`. These shortcuts made it
unclear when, for example, $cdstubtoc->discid was defined as opposed to
$cdstubtoc->cdstub->discid, or if $cdstubtoc->cdstub could always be
expected to be loaded.
Convert root/edit/{info,vote}.tt to React
This encompasses the edit page sidebar.

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from d2c111d to 12368de Oct 6, 2018

mwiencek added some commits Oct 4, 2018

Reduce the size of embedded JSON for hydration
For hydrated components that take an entity prop, we were serializing
the entire entity (potentially including a giant list of relationships,
mediums, etc.) even though we only needed a few bits of data from it
(such as the entity type and gid).

@mwiencek mwiencek force-pushed the mwiencek:sidebar-react branch from 12368de to 5b27ba2 Oct 8, 2018

@yvanzo

yvanzo approved these changes Oct 9, 2018

Copy link
Contributor

left a comment

Looks terably good to me!

@mwiencek mwiencek merged commit 3ba1376 into metabrainz:master Oct 11, 2018

1 check passed

Jenkins Build finished.
Details

@mwiencek mwiencek deleted the mwiencek:sidebar-react branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.