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

chore: cleanup old list mode #3179

Merged
merged 13 commits into from
Jun 5, 2024
Merged

Conversation

rebelchris
Copy link
Contributor

@rebelchris rebelchris commented Jun 4, 2024

Changes

Describe what this PR does

  • Would love to hear if anyone knows other places where we could cleanup more?

Events

Did you introduce any new tracking events?
Don't forget to update the Analytics Taxonomy sheet

Log the new/changed events below:

Type event_name value
Change/New event name extra: { ... }

Please make sure existing components are not breaking/affected by this PR

Manual Testing

On those affected packages:

  • Have you done sanity checks in the webapp?
  • Have you done sanity checks in the extension?
  • Does this not break anything in companion?

Did you test the modified components media queries?

  • MobileL (420px)
  • Tablet (656px)
  • Laptop (1020px)

Did you test on actual mobile devices?

  • iOS (Chrome and Safari)
  • Android

AS-360 #done

Preview domain

https://as-360-cleanup-feed-list-layout.preview.app.daily.dev

Copy link

vercel bot commented Jun 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 0:45am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
storybook ⬜️ Ignored (Inspect) Jun 5, 2024 0:45am

@@ -19,7 +29,7 @@ export function UserShortInfoPlaceholder({
.fill(0)
.map((_, i) => (
// eslint-disable-next-line react/no-array-index-key
<PlaceholderList key={i} />
<Placeholder key={i} />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was using the card list placeholder which didn't even match, so made a new matching one 🙏

Copy link
Contributor

@nensidosari nensidosari left a comment

Choose a reason for hiding this comment

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

Other possible cleanups:

  • forceCardMode as well doesn't apply anymore - I think it was a good think if we plan to refactor after we can rethink if we add this again.
  • In Feed & FeedContainer there is a useList and insane mode that we send to feedItemComponent that we don't need anymore
  • ActionButtons have an insaneMode prop that we never send to it
  • We send an insane mode to cards not on V1 which I don't think is used anymore
  • It would be good if we would rename the V1 cards to something with List.
  • There's something about showImage={!insaneMode} that we send to post cards that's not relevant anymore.

Practically needs a bit of search on insaneMode usage - I can help with doing the rest of the changes Chris if u want. Also in general maybe for future the whole thing of feed layout and the 2 types of cards would need a refactor as it's become a bit messy.

packages/shared/src/components/FeedItemComponent.tsx Outdated Show resolved Hide resolved
packages/shared/src/components/FeedItemComponent.tsx Outdated Show resolved Hide resolved
packages/shared/src/components/feeds/HorizontalFeed.tsx Outdated Show resolved Hide resolved
@omBratteng omBratteng marked this pull request as draft June 4, 2024 14:57
@omBratteng omBratteng marked this pull request as ready for review June 4, 2024 14:57
@omBratteng omBratteng marked this pull request as draft June 4, 2024 15:44
@omBratteng omBratteng marked this pull request as ready for review June 4, 2024 15:44
Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

Just had some minor comments but really had nothing blocking. Thank you for the cleanup! 🫡

packages/shared/src/components/FeedItemComponent.tsx Outdated Show resolved Hide resolved
packages/shared/src/components/cards/CommentPopup.tsx Outdated Show resolved Hide resolved
packages/shared/src/components/search/SearchBarInput.tsx Outdated Show resolved Hide resolved
@@ -10,16 +10,6 @@ import { SourceMember } from './sources';
import { graphqlUrl } from '../lib/config';
Copy link
Member

Choose a reason for hiding this comment

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

Nice! Thank you for adding this cleanup ❤️

Just remembered: do we have the ticket to clean up the rest of legacy weekly rank? CSS files, etc. @nensidosari

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I don't know why, but I think I have a personal vendetta against the legacy weekly goals, probably due to the problems it gave us back then 😂

packages/shared/src/lib/featureManagement.ts Outdated Show resolved Hide resolved
…p-feed_list_layout

# Conflicts:
#	packages/shared/src/components/Feed.tsx
Copy link
Contributor

@nensidosari nensidosari left a comment

Choose a reason for hiding this comment

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

Looks great!! Awesome cleanup! few comments non blocking, but that might be worth doing here. Up to u 🚀

packages/shared/src/components/FeedItemComponent.tsx Outdated Show resolved Hide resolved
packages/shared/src/components/FeedItemComponent.tsx Outdated Show resolved Hide resolved
Comment on lines 164 to +167
const isList =
(isHorizontal || isListModeV1) && !shouldUseListFeedLayout
(isHorizontal || isListMode) && !shouldUseListFeedLayout
? false
: (insaneMode && numCards > 1) || shouldUseListFeedLayout;
: (isListMode && numCards > 1) || shouldUseListFeedLayout;
Copy link
Contributor

Choose a reason for hiding this comment

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

I got the feeling this can now also be simplified as it contained logic for old list mode - but will need to check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright will leave it for this task as It's already a bit much.
Do think we can as we have also stuff like this: (which I think just is the same thing twice 😅)

      gapClass({
        isList,
        isFeedLayoutList: shouldUseListFeedLayout,

@rebelchris rebelchris merged commit 5f379e7 into main Jun 5, 2024
10 checks passed
@rebelchris rebelchris deleted the AS-360-cleanup-feed_list_layout branch June 5, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants