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

Drop V2: Drop Modal component #4970

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Drop V2: Drop Modal component #4970

wants to merge 27 commits into from

Conversation

TuvalSimha
Copy link
Collaborator

@TuvalSimha TuvalSimha commented Jun 13, 2024

cdn-access-tokens

Before:

Screenshot 2024-06-23 at 19 54 47 Screenshot 2024-06-23 at 19 54 55

After:

Screenshot 2024-06-23 at 19 54 04 Screenshot 2024-06-23 at 19 54 10

transfer-organization-ownership

Before:

Screenshot 2024-06-23 at 18 00 39

After:

Screenshot 2024-06-23 at 18 12 40

leave-organization

Before:

After:

delete-target

Before:

Screenshot 2024-06-23 at 18 02 41

After:

Screenshot 2024-06-23 at 18 12 58

delete-project

Before:

Screenshot 2024-06-23 at 18 03 36

After:

Screenshot 2024-06-23 at 18 13 17

delete-organization

Before:

Screenshot 2024-06-23 at 18 04 22

After:

Screenshot 2024-06-23 at 18 13 41

create-target

Before:

Screenshot 2024-06-23 at 18 05 27

After:

Screenshot 2024-06-23 at 18 16 25

create-project

Before:

Screenshot 2024-06-23 at 18 06 06

After:

Screenshot 2024-06-23 at 18 16 06

create-organization

Before:

Screenshot 2024-06-23 at 18 07 23

After:

Screenshot 2024-06-23 at 18 16 16

create-access-token

Before:

Screenshot 2024-06-23 at 18 08 04

After:

Screenshot 2024-06-23 at 19 50 49

connect-schema

Before:

Screenshot 2024-06-23 at 18 09 25

After:

Screenshot 2024-06-23 at 19 45 44

change-permissions - MISSING!

Before:

After:

Copy link

changeset-bot bot commented Jun 13, 2024

⚠️ No Changeset found

Latest commit: 458fc1f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TuvalSimha TuvalSimha changed the title create target modal Drop V2: Drop Modal component Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/apollo 0.33.2-alpha-20240613141521-9af6e7a66284022f726176bb85bef3c09656e06f npm ↗︎ unpkg ↗︎

Copy link
Contributor

github-actions bot commented Jun 13, 2024

📚 Storybook Deployment

The latest changes are available as preview in: https://0152ea3e.hive-storybook.pages.dev

Copy link
Contributor

github-actions bot commented Jun 13, 2024

🐋 This PR was built and pushed to the following Docker images (tag: 458fc1fb1da39b2f60dcaecedbde0277cde71f33):

Docker Bake metadata
{
"app": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/ei8omz0dnvijsa056tsw6l8sr",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:a955c3323b5136d81ff41a5ee876ef34e9ba7dab98238c3341e283b672642277",
    "size": 685
  },
  "containerimage.digest": "sha256:a955c3323b5136d81ff41a5ee876ef34e9ba7dab98238c3341e283b672642277",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/app:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/app:tuval_drop_modal"
},
"composition-federation-2": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/ks3b6lx4hqd2ofomfa48y3fav",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:80562be9241f3a6b17ad0ff2baa15f561b2054b5979fda0e1f33316cb752f42d",
    "size": 685
  },
  "containerimage.digest": "sha256:80562be9241f3a6b17ad0ff2baa15f561b2054b5979fda0e1f33316cb752f42d",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/composition-federation-2:tuval_drop_modal"
},
"emails": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/v6bczwjf1vourpk69tr9hzxgo",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:79e9daf715f4772157abc97f44c7ad08152190ea21c4a60a0b1a9c15612e7c10",
    "size": 685
  },
  "containerimage.digest": "sha256:79e9daf715f4772157abc97f44c7ad08152190ea21c4a60a0b1a9c15612e7c10",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/emails:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/emails:tuval_drop_modal"
},
"policy": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/wtdnxg05ipm50hvn58udmam6o",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:e7966aaca441581596ce9f2272d9f793940dbb16ed56f017ec477327eabe05c9",
    "size": 685
  },
  "containerimage.digest": "sha256:e7966aaca441581596ce9f2272d9f793940dbb16ed56f017ec477327eabe05c9",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/policy:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/policy:tuval_drop_modal"
},
"rate-limit": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/lbnrqtyff2wucdyd2ba5p7mfg",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:383d515abd7959c0c66917d7a517a10aae57ab34048401eebb8c04cc09d0e293",
    "size": 685
  },
  "containerimage.digest": "sha256:383d515abd7959c0c66917d7a517a10aae57ab34048401eebb8c04cc09d0e293",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/rate-limit:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/rate-limit:tuval_drop_modal"
},
"schema": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/r1bbpj05hzynknltn28u55ga7",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:b52b6a8017ac4187eceb71591c7945b5a3dbe36193e6c94adaaeb52a5069f25c",
    "size": 685
  },
  "containerimage.digest": "sha256:b52b6a8017ac4187eceb71591c7945b5a3dbe36193e6c94adaaeb52a5069f25c",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/schema:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/schema:tuval_drop_modal"
},
"server": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/z9r0gsmc0lvvegn9fdb9wwu1r",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:a994d33c7aff3d60969c16999c7dede04fa38b8cf8a2b0968198a9dcec67fa1a",
    "size": 685
  },
  "containerimage.digest": "sha256:a994d33c7aff3d60969c16999c7dede04fa38b8cf8a2b0968198a9dcec67fa1a",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/server:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/server:tuval_drop_modal"
},
"storage": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/mgqoq6snieoi812f7tms25sq8",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:3c6f1534fee755812e93978414d28cb70ce4b152678e4991eeedd29ee65544e3",
    "size": 685
  },
  "containerimage.digest": "sha256:3c6f1534fee755812e93978414d28cb70ce4b152678e4991eeedd29ee65544e3",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/storage:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/storage:tuval_drop_modal"
},
"stripe-billing": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/eir7nzgg6q0enxiexe1l8pp2c",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:f5f47f3a9fb6920939978147c4aabdc5ecfa2345f4e3d08f35ddab0c1b18d755",
    "size": 685
  },
  "containerimage.digest": "sha256:f5f47f3a9fb6920939978147c4aabdc5ecfa2345f4e3d08f35ddab0c1b18d755",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/stripe-billing:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/stripe-billing:tuval_drop_modal"
},
"tokens": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/sl03o3d3nenn2tqt2awom9qwv",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:83755b439fcb73a2ecd5868f0c8dc9f2d3340666b92397d55df7cc57ba1baee4",
    "size": 685
  },
  "containerimage.digest": "sha256:83755b439fcb73a2ecd5868f0c8dc9f2d3340666b92397d55df7cc57ba1baee4",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/tokens:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/tokens:tuval_drop_modal"
},
"usage": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/z1kn67cvdjpa9zpeym29ncfku",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:7b56b59e3aa73fd4f1460ec8a01ce927459659c3fd9bc1a0278e2bd1226f724d",
    "size": 685
  },
  "containerimage.digest": "sha256:7b56b59e3aa73fd4f1460ec8a01ce927459659c3fd9bc1a0278e2bd1226f724d",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/usage:tuval_drop_modal"
},
"usage-estimator": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/u4tx56fhyi6uclq77jcwrh957",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:102dbe9e880a0ec9087c471898da6a7a3a6adf94a793ddb640fe751801aaa434",
    "size": 685
  },
  "containerimage.digest": "sha256:102dbe9e880a0ec9087c471898da6a7a3a6adf94a793ddb640fe751801aaa434",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-estimator:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/usage-estimator:tuval_drop_modal"
},
"usage-ingestor": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/llfzbja4emucwaqqa5umydhmc",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:c4dc8ce21dd03e61ab47b9a6f3e1122ee515f1253fd463e2be558a3d612ded2e",
    "size": 685
  },
  "containerimage.digest": "sha256:c4dc8ce21dd03e61ab47b9a6f3e1122ee515f1253fd463e2be558a3d612ded2e",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/usage-ingestor:tuval_drop_modal"
},
"webhooks": {
  "buildx.build.ref": "builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b/builder-92a5b1af-6c3d-4c23-af41-0f5f77161c6b0/0pt5l3lp8w6qxr1jooj9tcmr0",
  "containerimage.descriptor": {
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "digest": "sha256:082248c5cb498f981789b33ba9c7bb69fbeb714a05a499c4ea4a9dbc91a23002",
    "size": 685
  },
  "containerimage.digest": "sha256:082248c5cb498f981789b33ba9c7bb69fbeb714a05a499c4ea4a9dbc91a23002",
  "image.name": "ghcr.io/kamilkisiela/graphql-hive/webhooks:458fc1fb1da39b2f60dcaecedbde0277cde71f33,ghcr.io/kamilkisiela/graphql-hive/webhooks:tuval_drop_modal"
}
}

@TuvalSimha TuvalSimha marked this pull request as draft June 13, 2024 16:40
@TuvalSimha TuvalSimha force-pushed the tuval/drop-modal branch 5 times, most recently from b2bf79e to f51b8bc Compare June 23, 2024 16:58
@TuvalSimha TuvalSimha marked this pull request as ready for review June 23, 2024 16:58
@TuvalSimha TuvalSimha force-pushed the tuval/drop-modal branch 2 times, most recently from 848844a to 985d816 Compare June 25, 2024 12:35
@TuvalSimha TuvalSimha force-pushed the tuval/drop-modal branch 2 times, most recently from d63e2e2 to 3b5bb9c Compare June 27, 2024 16:24
Comment on lines +3 to +10
// Exposes environment variables to the frontend as a JavaScript object.
window.__ENV ||= {
ENVIRONMENT: 'development',
APP_BASE_URL: 'http:https://localhost:3000',
GRAPHQL_PUBLIC_ENDPOINT: 'http:https://localhost:3001/graphql',
GRAPHQL_PUBLIC_SUBSCRIPTION_ENDPOINT: 'http:https://localhost:3001/graphql',
GRAPHQL_PUBLIC_ORIGIN: 'http:https://localhost:3001',
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Idk what a proper way to inject env variables (set window.__ENV) for the storybook, any suggestions?

Comment on lines -1 to 3
function isBrowser() {
// eslint-disable-next-line no-restricted-syntax
return Boolean(
typeof window !== 'undefined' && '__ENV' in window && window['__ENV'] !== undefined,
);
}

export function getAllEnv(): Record<string, string | undefined> {
if (isBrowser()) {
return (window as any)['__ENV'] ?? {};
}

throw new Error('getAllEnv should only be called in the browser');
return (window as any).__ENV ?? {};
}
Copy link
Collaborator

@dimaMachina dimaMachina Jul 2, 2024

Choose a reason for hiding this comment

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

already was refactored in my another PR, this fix storybook issue https://github.com/kamilkisiela/graphql-hive/pull/5004/files#r1647826466

delete target & create org

DeleteProjectModal

DeleteOrganizationModal

CreateProjectModal

ChangePermissionsModal

ConnectSchemaModal

CreateAccessTokenModal

LeaveOrganizationModal
@kamilkisiela
Copy link
Owner

kamilkisiela commented Jul 10, 2024

Screenshot 2024-07-10 at 10 55 07

Artifacts should not be part of the selectable options (the same applies to the other select component, contracts)
![Screenshot 2024-07-10 at 10 26 36](https://github.com/kamilkisiela/graphql-hive/assets/
Screenshot 2024-07-10 at 10 21 48
8167190/e276963f-4882-4b63-99a2-e3c811d81e46)

Emails are missing here and the spacing is missing
Screenshot 2024-07-10 at 08 54 12

Creating a registry token does not work.
When I click on "Read only" option or pretty much any option, it has no effect.
Selecting 'No access' should not make "Generate Token" button active.

Screen.Recording.2024-07-10.at.11.03.06.mov

I will stop my review here.

Do you think splitting the PR into smaller PRs or doing it view by view, not component by component as I proposed before makes sense?

Copy link
Owner

@kamilkisiela kamilkisiela left a comment

Choose a reason for hiding this comment

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

I commented what needs to be improved

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.

None yet

4 participants