Skip to content

chore: Apply application layout to register snap page#5064

Merged
steverydz merged 3 commits intomainfrom
WD-19646-apply-application-layout-to-register-snap-page
Apr 2, 2025
Merged

chore: Apply application layout to register snap page#5064
steverydz merged 3 commits intomainfrom
WD-19646-apply-application-layout-to-register-snap-page

Conversation

@steverydz
Copy link
Copy Markdown
Contributor

@steverydz steverydz commented Mar 20, 2025

Done

Converts register snap page to React and includes in the publisher pages app

How to QA

  • Go to https://snapcraft-io-5064.demos.haus/register-snap
  • Try to register a snap you already own
  • Check that you get a notification to say you already own it
  • Try to register an existing snap you don't own
  • Check that you get a notification to say it's already owned
  • Try to register a snap in the global store
  • Check that there is a notification saying it has been submitted for review
  • Try to register a snap in "Canonical Web Team Test Store"
  • Check that you are redirected to /snaps when complete

Testing

  • This PR has tests
  • No testing required (explain why):

Issue / Card

Fixes https://warthogs.atlassian.net/browse/WD-19646

@webteam-app
Copy link
Copy Markdown

@abbiesims
Copy link
Copy Markdown
Contributor

I'm not being redirected to /snaps after registering a snap in Canonical Web Team Test Store. It doesn't look like it's registering

@steverydz steverydz force-pushed the WD-19646-apply-application-layout-to-register-snap-page branch 3 times, most recently from 3569934 to 9555484 Compare March 21, 2025 14:10
@bartaz
Copy link
Copy Markdown
Member

bartaz commented Mar 31, 2025

When I try to register a name I already know, notification shows correctly that I own it and the name is linked. But clicking on the link leads to 404 page (https://snapcraft-io-5064.demos.haus/bartaz-test/listing)

image

But if I find that name on my snaps list, and click link there, it loads correctly (at the same URL): https://snapcraft-io-5064.demos.haus/bartaz-test/listing

image

So it seems like the route works fine inside react app, but when linked to not via router it doesn't load correct template or something?

Edit: the name is registered, but no snap has been published under that name yet (if that matters).

@steverydz steverydz force-pushed the WD-19646-apply-application-layout-to-register-snap-page branch 2 times, most recently from 6239201 to 6055830 Compare March 31, 2025 10:32
@steverydz
Copy link
Copy Markdown
Contributor Author

@bartaz I've added a change we discussed where there is a notification if for some reason the listing endpoint fails. Could you please re-review?

Comment thread webapp/publisher/snaps/views.py
Comment thread static/js/publisher/utils/filterAvailableStores.ts
Comment thread static/js/publisher/pages/RegisterSnap/__tests__/RegisterSnap.test.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/__tests__/RegisterSnap.test.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnap.tsx
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnap.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnap.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnap.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnapForm.tsx Outdated
Comment thread static/js/publisher/pages/RegisterSnap/RegisterSnapForm.tsx Outdated
Comment thread tests/publisher/tests_register_name.py
Comment thread tests/publisher/tests_register_name.py
Comment thread tests/publisher/tests_register_name.py
@steverydz steverydz force-pushed the WD-19646-apply-application-layout-to-register-snap-page branch 3 times, most recently from 8a313d5 to f1be7ff Compare April 1, 2025 15:11
Comment thread tests/publisher/tests_register_name.py
@steverydz steverydz force-pushed the WD-19646-apply-application-layout-to-register-snap-page branch from f1be7ff to d50f70a Compare April 2, 2025 10:42
steverydz and others added 3 commits April 2, 2025 11:43
…test.tsx

Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
…test.tsx

Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
@steverydz steverydz force-pushed the WD-19646-apply-application-layout-to-register-snap-page branch from d50f70a to 6fe84f6 Compare April 2, 2025 10:43
Copy link
Copy Markdown
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, looks good.

@steverydz steverydz merged commit 72423d2 into main Apr 2, 2025
11 checks passed
@steverydz steverydz deleted the WD-19646-apply-application-layout-to-register-snap-page branch April 2, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants