Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[C-1090] Improve profile store layout#1963

Merged
dylanjeffers merged 2 commits into
mainfrom
dj-c-1090-improve-profile-store-layout
Sep 21, 2022
Merged

[C-1090] Improve profile store layout#1963
dylanjeffers merged 2 commits into
mainfrom
dj-c-1090-improve-profile-store-layout

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Description

  • Improves profile store layout, by allowing multiple profile page states to be saved at once.
  • This improves mobile profile navigation, since we don't have to reset profile state, which causes poor navigation performance and ui.
  • Written in a backwards-compatible way, so web doesn't need to do anything different. Eventually we may want to apply this new system to web though.
  • Updates lineup default state from .LOADING to .IDLE

@sliptype sliptype left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is awesome! Super clean and makes sense


const profileState = state.entries[handle] ?? initialProfileState

const newState = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could rename this to newEntry for clarity

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

totes

userIds:
state[action.followerGroup].userIds.concat(filteredAddedUserIds),
status: Status.SUCCESS
entries: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Starting to look like we should convert this to redux toolkit so that we can leverage immer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah def agreed

export const RepostsTab = () => {
const lineup = useSelector(getUserFeedMetadatas)
const { handle } = useSelectProfile(['handle'])
// const lineup = useSelector((state) => getProfileFeedLineup(state, handle))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Extra comment

getPathname(this.props.location) !== getPathname(location) ||
action === 'POP'
) {
this.props.resetProfile()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So even on web we don't have to reset anymore?

@dylanjeffers dylanjeffers Sep 21, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah cause the "currentUser" for the current profile page will go to that users state, so we don't get weird overlap!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hell yeah, so nice

@audius-infra

Copy link
Copy Markdown
Collaborator

@dylanjeffers dylanjeffers merged commit 8f9ed13 into main Sep 21, 2022
@dylanjeffers dylanjeffers deleted the dj-c-1090-improve-profile-store-layout branch September 21, 2022 20:35
audius-infra pushed a commit that referenced this pull request Sep 24, 2022
[2d44919] Fix now-playing navigation (#1992) Dylan Jeffers
[d7065e6] Update react-native-screens patchfile (#1991) Dylan Jeffers
[7348257] [C-1172] Add screen freeze (#1990) Dylan Jeffers
[d4c9f17] Fix TopSupporters, TrackScreen caching (#1989) Dylan Jeffers
[38a4f59] Prevent track restart by adding selector equality for track owner (#1957) Sebastian Klingler
[c2eb69e] [C-482] Fix android navigation bar clipping (#1988) Dylan Jeffers
[0da8377] [PLAT-98] Add feature flag for auto sub (#1979) Raymond Jacobson
[7ce5b87] [C-1151] Fix empty profile tab (#1984) Dylan Jeffers
[4aff4ee] [C-1048] Reset scrubber on song repeat (#1985) Dylan Jeffers
[c48df76] [C-1160,C-1161] Fix search navigation (#1980) Dylan Jeffers
[a2a6b4b] Fix mobile favorites c-831 (#1981) nicoback2
[5dce1d4] Update stage mobile env to goerli (#1987) Raymond Jacobson
[bd5aadb] Fix mac build (#1986) Raymond Jacobson
[eba0787] fix tag search more results (#1983) nicoback2
[39b66f4] Remove trimtoalphanumeric (#1982) Raymond Jacobson
[69f9c6f] keep relevant search results in store (#1973) nicoback2
[c76faaa] fix playlist link in tile overflow menu (#1976) nicoback2
[93903ca] Update staging to use goerli addresses (#1978) Isaac Solo
[f369627] [C-1152] Improve favorites tab performance (#1975) Dylan Jeffers
[b24dbe4] Fix playlist challenge optimistic update (#1974) Michael Piazza
[d31daf7] Set limit when getting bulk tracks by id because default is 100 (#1970) Sebastian Klingler
[d602cca] Update new table styles for qa issues (#1969) Kyle Shanks
[62097aa] Disable account sync to test app failure (#1972) Dylan Jeffers
[a40953d] [C-1137] Add debounce to change in NetworkInfo status (#1967) Andrew Mendelsohn
[7c765af] [C-976] Fix native artist recommendations (#1971) Dylan Jeffers
[a48eed5] [C-1004] Fix sign-up -> sign-in email bug (#1968) Dylan Jeffers
[8f9ed13] [C-1090] Improve profile store layout (#1963) Dylan Jeffers
[b1003b8] [C-978] Check for track repeat before advancing shuffle (#1965) Andrew Mendelsohn
[d5aa252] Update new table styles for table action buttons (#1964) Kyle Shanks
[074f0bd] Prevent toasts from appearing when overflow menu is clicked (#1962) Sebastian Klingler
[a333649] Remove filter skeletone from new tables (#1961) Kyle Shanks
[5291b03] c-1127 Fix more search results track lineup (#1959) nicoback2
[722819b] Upgrade CI xcode and provide dSyms (#1960) Raymond Jacobson
[36ca926] Add track entity manager feature flag (#1743) Joseph Lee
[d2a5065] fix search result -> track screen bug (#1955) nicoback2
[5f0d280] [PAY-634] On Ramp Design Fixes (Part 1) (#1949) Marcus Pasell
[926469d] Fix new table styling (#1958) Kyle Shanks
[7236aa4] Update favorites page table columns, update reorderable table title and artist cursor, and display tooltips for table headers (#1956) Kyle Shanks
[e410fed] Implement small UI tweaks (#1952) Raymond Jacobson
[6f92aad] Apply accessbility patch for ios16 and xcode14 (#1951) Raymond Jacobson
[ced5749] Fix native profile render (#1945) Dylan Jeffers
[e6a3d87] Fix hover state for the new tables (#1953) Kyle Shanks
[6746e80] [PAY-428] Wrap link text in notifications (#1948) Reed
[f54f07e] Fix feed filter native c-1115 (#1947) nicoback2
[09a7e96] Upload sourcemaps for prod and release-candidate (#1946) Sebastian Klingler
[9cd2b89] [PAY-565] TokenValueInputV2 Component (#1869) Marcus Pasell
[2242786] Use artwork from track for MusicControl (#1943) Sebastian Klingler
[ed84022] [C-1067] Add feature flag for offline mode (#1941) Andrew Mendelsohn
[87f1082] send amplitude event when app crahses (#1942) nicoback2
[dc5c393] Disable gesture on AddToPlaylist drawer (#1944) Sebastian Klingler
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants