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: Modal to publish worlds to ENS names #2903

Merged
merged 23 commits into from
Sep 28, 2023

Conversation

fzavalia
Copy link
Contributor

@fzavalia fzavalia commented Sep 22, 2023

Closes #2899
Closes #2906
Closes #2905

Screenshot 2023-09-22 at 17 13 28 Screenshot 2023-09-22 at 17 13 34 Screenshot 2023-09-22 at 17 13 45 Screenshot 2023-09-22 at 17 15 17

@vercel
Copy link

vercel bot commented Sep 22, 2023

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

Name Status Preview Comments Updated (UTC)
builder ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2023 10:25pm

@coveralls
Copy link

coveralls commented Sep 22, 2023

Pull Request Test Coverage Report for Build 6332064957

  • 21 of 144 (14.58%) changed or added relevant lines in 8 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 17.178%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Modals/DeployModal/DeployModal.tsx 0 2 0.0%
src/modules/ens/reducer.ts 5 10 50.0%
src/components/Modals/DeployModal/DeployToWorld_WorldsForEnsOwnersFeature/DeployToWorld.container.ts 0 8 0.0%
src/components/Modals/DeployModal/DeployToWorld_WorldsForEnsOwnersFeature/DeployToWorld.tsx 0 108 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/Modals/DeployModal/DeployModal.container.ts 1 0.0%
src/modules/ens/reducer.ts 2 21.25%
Totals Coverage Status
Change from base Build 6318984207: -0.03%
Covered Lines: 3492
Relevant Lines: 16293

💛 - Coveralls

Copy link
Contributor

@LautaroPetaccio LautaroPetaccio left a comment

Choose a reason for hiding this comment

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

The PR looks good! I've left some comments that need some reviewing

src/modules/translation/languages/en.json Outdated Show resolved Hide resolved
src/modules/ens/utils.ts Show resolved Hide resolved
}, [ensList, onRecord, analytics])

useEffect(() => {
if (view === DeployToWorldView.FORM && loading && error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it show the error view while loading?

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 logic came from the original component.

What I understand from this is that when the user clicks on publish, loading is set to true.

Then when an error appears in the state, the useEffect picks it and changes the view to ERROR.

On the other case, if no error is provided but the current deployment is found on the store, the SUCCESS view is set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Answering your question: It does not show the error while loading

className={styles.modalBodyStateActionButton}
content={t('deployment_modal.deploy_world.success.share_in_twitter')}
icon="twitter"
href={getShareInTwitterUrl()}
Copy link
Contributor

Choose a reason for hiding this comment

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

We could track the twitter sharing action if we would like to, what do you think about it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be a good idea to track it.

#2921 Created an issue in the epic to do so

src/modules/ens/sagas.ts Show resolved Hide resolved
}: Props) {
const analytics = getAnalytics()

const [view, setView] = useState<string>('')
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind adding tests for this component?

Copy link
Contributor Author

@fzavalia fzavalia Sep 27, 2023

Choose a reason for hiding this comment

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

It's kind of a big component. It's a pity that original one didn't have tests.

Testing the whole component will require a lot of time and might break the schedule 😢

Co-authored-by: Lautaro Petaccio <[email protected]>
Signed-off-by: Fernando Zavalia <[email protected]>
it('should get the ens object by using the getENSBySubdomain selector', async () => {
await expectSaga(ensSaga, builderClient, ensApi)
.select(getENSBySubdomain, subdomain)
.dispatch(fetchENSWorldStatusRequest(subdomain))
Copy link
Contributor

Choose a reason for hiding this comment

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

The main objective of the sagas tests is to check the correctness of the actions that are put (which is the objective of any saga), would you mind checking what is put?

Copy link
Contributor

@LautaroPetaccio LautaroPetaccio left a comment

Choose a reason for hiding this comment

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

🚀

@fzavalia fzavalia merged commit 1a01a82 into master Sep 28, 2023
@fzavalia fzavalia deleted the feat/deploy-to-worlds-with-ens branch September 28, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants