mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-10 20:56:29 +00:00
bed476517c
This commit integrates an bare skeleton of the odyssey frontend that we implemented in the [odyssey-hackathon] repository. You can see the working frontend that we are trying to port over at [sourcecred.io/odyssey-hackathon/][scio]. The prototype in the other repository has some tooling choices which are incompatible/redundant with decisions in our codebase (sass vs aphrodite), and requires some tools not yet present here (svg-react-loader). This commit includes the build and integration work needed to port the prototype frontend into mainline SourceCred. The frontend scaffold isn't yet integrated with any "real" Odyssey data. One potential issue: right now, every page that is rendered from the SourceCred homepage is contained within a [homepage/Page], meaning that it has full SourceCred website styling, along with the SourceCred website header. The [application][scio] also has a header. Currently, I work around this by having the Odyssey UI cover up the base header (via absolute positioning), which works but is hacky. We can consider more principled solutions: - Finding a way to specify routes which aren't contained by [homepage/Page]; maybe by adding a new top-level route [here][route-alternative]. - Unify the headers for the Odyssey viewer and the page as a whole (sounds like inappropriate entanglement?) - Have a website header and also an application header (sounds ugly?) [homepage/Page]:ee1d2fb996/src/homepage/Page.js
[route-alternative]:ee1d2fb996/src/homepage/createRoutes.js (L17)
Test plan: Run `yarn start`, and then navigate to `localhost:8080/odyssey/`. observe that a working website is displayed, and that the cred logo next to the word "SourceCred" is loaded properly (i.e. svg-react-loader is integrated properly). Observe that there are no build/compile errors from either `yarn start` or `yarn build`. Also, observe that the UI looks passably nice, and that if the number of elements in the entity lists is larger than can be displayed, the sidebar pane scrolls independently. The UI was tested in both Chrome and Firefox. [odyssey-hackathon]: https://github.com/sourcecred/odyssey-hackathon [scio]: https://sourcecred.io/odyssey-hackathon/ Thanks to @jmnemo, as the implementation is based on [his work]. [his work]: https://github.com/jmnemo/hackathon-event/