Wraps the app in a provider, so now everything has access to that factory
Partially implements search, works with a CORS unblocker of some form at current time (due to search.maven.org cors settings)
Implements Stats page, adds query to the ArtifactServicesFactory and SolrService
Injects runtime config at bootup, reading config.json in the root of the project (see src/index.tsx. Strongly typed this as well.
Implements the parseOnGrouping function verbatim from the old site, so that queries get translated to something SOLR can use
Adds in jestts-jest and the other needed helpers for testing
Updates README to mention new dev workflow, etc...
Basic constraints:
Right now just keep on trucking with the SOLR search stuff
Ideally this site gets deployed 100% separately from the backend, so let's imagine it lives in an S3 bucket or some dumb place at some point where it's more or less not connected to the backend
Make sure the config for endpoints etc... is hot swappable, or something akin, such that the site can be deployed pointed against a different backend
Ideally, let's keep the URLs the same as the existing site, so if we were to use this experiment, it can happen fairly seamlessly, low effort, etc...
TODO:
[X] Implement Search (just very basic, I searched, I got a result back)
Current progress
Quick Stats:
Search Page (home):
Search Page (searching):
Search Page (advanced search modal open):
Artifact details page:![screencapture-localhost-3000-artifact-struts-struts-1-2-9-jar-2021-10-28-21_23_52](https://user-images.githubusercontent.com/5544326/139380441-f89922a5-7fd8-4d7c-9848-2b03d30ecc93.png)
This is a very basic PR so far that deletes all Angular things, and is slowly moving towards using React
This is not to be merged into main, this is where we start rebuilding the project
To get started:
yarn
in the root, so haveyarn
as wellyarn start
should open the app, and livereloadyarn test
can now be used to run unit tests, it's usingjest
To get search things working, use a CORS unblocker of some form. I use: https://add0n.com/access-control.html
This pull request thus far, makes the following changes:
react
node
v14.18.1+ for building things (we really should try and hit 16 or higher as we do this)webpack
to build things, and run a dev server (opens atlocalhost:3000
)react-router-dom
, and implements a few basic routes, with supporting config for webpackeslint
, and config forprettier
and uh, regular linting things (manifests asyarn lint
)Artifact
,Search
, andStats
@sonatype/react-shared-components
AKA RSCReact.Context
to provide aartifactFactory
, which should allow swapping in new Services over time a lot easier as this Factory takes a initialClient, which is an interface forArtifactServiceInterface
. MYSTIC STYLES. Some of this was gleaned from: https://blog.testdouble.com/posts/2021-03-19-react-context-for-dependency-injection-not-state/ArtifactServicesFactory
andSolrService
config.json
in the root of the project (seesrc/index.tsx
. Strongly typed this as well.parseOnGrouping
function verbatim from the old site, so that queries get translated to something SOLR can usejest
ts-jest
and the other needed helpers for testingBasic constraints:
TODO:
SearchUtils.ts
)config.json
in the site root will control runtime settings)RSC-769
(related to use ofNxSearchDropdown
and how we push to history)