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

Revert "Feat/migrate dashboard" #4445

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

jlbyrne
Copy link
Contributor

@jlbyrne jlbyrne commented Jun 4, 2024

Reverts #4393

Copy link

github-actions bot commented Jun 4, 2024

[puLL-Merge] - brave-intl/publishers@4445

Description

This PR removes a significant amount of code related to the NextJS app, including:

  • Removal of several API controllers and associated endpoints for managing channels, crypto addresses, OAuth connections, and the home dashboard
  • Deletion of the home dashboard page and related components in the NextJS app
  • Removal of styles, images, and other assets used by the deleted pages/components
  • Updates to tests and fixtures to reflect the removed code

The motivation for these changes is not entirely clear from the diff alone, but it seems to be a major refactoring to remove unused or unnecessary functionality from the NextJS app and simplify the codebase.

Changes

Changes

app/controllers/:

  • Removed api/nextv1/channels_controller.rb
  • Removed api/nextv1/connection/bitflyer_connections_controller.rb
  • Removed api/nextv1/connection/gemini_connections_controller.rb
  • Removed api/nextv1/connection/uphold_connections_controller.rb
  • Removed api/nextv1/crypto_address_for_channels_controller.rb
  • Removed api/nextv1/crypto_addresses_controller.rb
  • Removed api/nextv1/home_controller.rb
  • Removed api/nextv1/oauth2_controller.rb

app/helpers/publishers_helper.rb:

  • Updated next_deposit_date method to format date as "Month 13th" instead of "Month 13, YYYY"

app/models/channel.rb:

  • Removed failed_verification_details and failed_verification_call_to_action methods

app/models/site_channel_details.rb:

  • Removed unnecessary return statement in brave_publisher_id_error_description

config/routes.rb:

  • Removed routes for deleted API controllers and endpoints

nextjs/:

  • Updated dependencies in package.json
  • Removed custom fonts in public/fonts/
  • Removed or updated several images in public/images/
  • Removed allow list for /home/ route in scripts/create-local-server.js
  • Updated layout and removed unused imports and components in src/app/[locale]/layout.tsx
  • Added NavDropdown component in src/app/[locale]/publishers/NavDropdown.tsx
  • Removed NavagationOptions, AddChannelModal, ChannelCard, ChannelCryptoEditor, CryptoPrivacyModal, CryptoWalletOption, EmptyChannelCard, CustodianServiceWidget components
  • Removed src/app/[locale]/publishers/home/ page and associated files
  • Updated publisher layout in src/app/[locale]/publishers/layout.tsx
  • Minor updates to src/app/[locale]/publishers/totp_registrations/new/page.jsx
  • Removed Container and CryptoAddressProvider components
  • Simplified apiRequest in src/lib/api.ts
  • Removed many strings from src/messages/en.json
  • Removed custom styles in src/styles/ChannelCard.module.css and src/styles/Layout.module.css
  • Various updates to styles in src/styles/globals.css and src/styles/variables.css

test/:

  • Removed tests for deleted API controllers
  • Updated expected values in some existing tests
  • Removed some fixtures no longer needed by tests

Overall, this is a very large change touching many parts of the application. The removal of the home dashboard and associated functionality is the most significant change. Thorough testing should be done to ensure the app still works as expected after these removals.

@jlbyrne jlbyrne merged commit 6609e8d into staging Jun 4, 2024
5 of 7 checks passed
@jlbyrne jlbyrne deleted the revert-4393-feat/migrate-dashboard branch June 4, 2024 21:16
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.

2 participants