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

feat: update DevCard design #3879

Merged
merged 22 commits into from
Aug 12, 2024
Merged

feat: update DevCard design #3879

merged 22 commits into from
Aug 12, 2024

Conversation

zeucapua
Copy link
Contributor

@zeucapua zeucapua commented Aug 7, 2024

Description

Implements a new DevCard design that showcases OSCR and the user's contribution activity

Related Tickets & Documents

Closes #3872

Mobile & Desktop Screenshots/Recordings

Area.mp4
Arc.mp4
Arc2.mp4

Steps to QA

  1. Go to a user's page and click the pizza icon beside their avatar
  2. See the new design, pressing arrow keys or clicking to go to other DevCards

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

approve-love-it-gif-by-disney-channel

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for oss-insights ready!

Name Link
🔨 Latest commit 0882f4d
🔍 Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/66ba371ae7e34c0008121aa4
😎 Deploy Preview https://deploy-preview-3879--oss-insights.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for design-insights ready!

Name Link
🔨 Latest commit 0882f4d
🔍 Latest deploy log https://app.netlify.com/sites/design-insights/deploys/66ba371aad1e3000084abe3f
😎 Deploy Preview https://deploy-preview-3879--design-insights.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nickytonline
Copy link
Member

nickytonline commented Aug 10, 2024

It looks like your test fails as part of the regular test suite, not the E2E tests. The unit/component tests aren't aware of the env vars that the Supabase client is looking for.

image

I don't think the tests ever passed locally. I made them stop failing by adding the following to the vitest.config.ts.

import { fileURLToPath } from "url";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    alias: {
      components: fileURLToPath(new URL("./components", import.meta.url)),
      lib: fileURLToPath(new URL("./lib", import.meta.url)),
      helpers: fileURLToPath(new URL("./helpers", import.meta.url)),
      img: fileURLToPath(new URL("./img", import.meta.url)),
    },
  },
  test: {
    include: ["./**/*.test.ts", "./**/*.test.tsx"],
    globals: true,
    environment: "jsdom",
+    env: {
+      NEXT_PUBLIC_SUPABASE_URL: "https://test.supabase.co",
+      NEXT_PUBLIC_SUPABASE_ANON_KEY: "test-anon-key",
+    },
  },
});

Right now with the fix above, the tests run now, but fail with

AssertionError: expected "spy" to be called with arguments: [ undefined ]

Received: 

  1st spy call:

  Array [
-   undefined,
+   "zeucapua",
  ]


Number of calls: 1

 ❯ components/organisms/DevCardCarousel/dev-card-carousel.test.tsx:28:26


⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯

 FAIL  components/organisms/DevCardCarousel/dev-card-carousel.test.tsx > DevCardCarousel > when the user uses the arrow keys > when the user presses the left arrow key > should select the second card
AssertionError: expected "spy" to be called with arguments: [ undefined ]

Received: 

  1st spy call:

  Array [
-   undefined,
+   "zeucapua",
  ]


Number of calls: 1

 ❯ components/organisms/DevCardCarousel/dev-card-carousel.test.tsx:36:26

I think a component test for a single DevCard makes more sense (shouldn't be calling supabaseClient) and test the dev card page which has the dev card carousel in an E2E test.

Anyway, we can chat about it Monday.

components/atoms/Pill/pill.tsx Show resolved Hide resolved
pages/404.tsx Show resolved Hide resolved
pages/404.tsx Show resolved Hide resolved
pages/u/[username]/card.tsx Show resolved Hide resolved
pages/u/[username]/card.tsx Show resolved Hide resolved
@jpmcb
Copy link
Member

jpmcb commented Aug 12, 2024

If we can move this forward as "good enough ™️ " to not block launch and fast follow with small style fixes or code cleanup, I'd say that'd be ideal.

@zeucapua zeucapua marked this pull request as ready for review August 12, 2024 16:23
@nickytonline
Copy link
Member

If we can move this forward as "good enough ™️ " to not block launch and fast follow with small style fixes or code cleanup, I'd say that'd be ideal.

I'm going to go ahead and approve based on ☝🏻. Just have a fast follow for change requests that weren't made.

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Approving to get this into the launch.

Copy link
Member

@BekahHW BekahHW left a comment

Choose a reason for hiding this comment

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

Let's Go

@zeucapua zeucapua added this pull request to the merge queue Aug 12, 2024
Merged via the queue into beta with commit 979576d Aug 12, 2024
19 checks passed
@zeucapua zeucapua deleted the feat/devcard-design-update branch August 12, 2024 16:48
open-sauced bot pushed a commit that referenced this pull request Aug 12, 2024
## [2.54.0-beta.1](v2.53.1-beta.2...v2.54.0-beta.1) (2024-08-12)

### 🍕 Features

* update DevCard design ([#3879](#3879)) ([979576d](979576d))
open-sauced bot pushed a commit that referenced this pull request Aug 12, 2024
## [2.54.0](v2.53.0...v2.54.0) (2024-08-12)

### 🐛 Bug Fixes

* add margin left to prevent overflow of nav item ([#3904](#3904)) ([c8b8ace](c8b8ace))
* contributor insight card orange dot no longer squished ([#3912](#3912)) ([01cb265](01cb265))

### 🍕 Features

* update DevCard design ([#3879](#3879)) ([979576d](979576d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Update devcard with new design
4 participants