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!: config is always visible on landing page #496

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

Conversation

SgtPooki
Copy link
Member

@SgtPooki SgtPooki commented Dec 2, 2024

Title

feat!: config is always visible on landing page

Description

This change adds the config section to the main landing page (i.e. helper-ui.tsx) and removes the config gear icon in the header, and direct access to an isolated config page (unless on a subdomain)

Some heading text was also added to the config to make it more clear that it is a config section.

Fixes #486

Notes & open questions

We still have a page accessible at /#/ipfs-sw-config for subdomain users to be able to edit the config, and a test for that now.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@SgtPooki SgtPooki linked an issue Dec 2, 2024 that may be closed by this pull request
@SgtPooki SgtPooki requested review from lidel and 2color December 2, 2024 21:42
Copy link
Member Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

src/components/Header.tsx Show resolved Hide resolved
src/context/config-context.tsx Outdated Show resolved Hide resolved

const isRequestToViewConfigPage = isConfigPage(window.location.hash)
return isRequestToViewConfigPage
return isRequestToViewConfigPage && isSubdomainGatewayRequest(window.location)
Copy link
Member Author

Choose a reason for hiding this comment

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

only render this individual config page on subdomain requests explicitly for /#/ipfs-sw-config

src/pages/helper-ui.tsx Outdated Show resolved Hide resolved
src/pages/helper-ui.tsx Outdated Show resolved Hide resolved
Copy link
Member Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review after changes

Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

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

Nicer addition.
LGTM. Also tested locally.

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
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.

Simplify configuration access on main page
2 participants