-
Notifications
You must be signed in to change notification settings - Fork 115
Pioneer - new polkadot-js/apps skeleton #1101
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
Conversation
skip-checks: true
* Modal for setting sub identities * Small update * Add/Remove rows for subs * Disable on invalid raw value * Set of actual identities * Rewrite yarn.lock
skip-checks: true
skip-checks: true
* 0.48 * CHANGELOG
skip-checks: true
skip-checks: true
* Indicate own nominees on targets * icon prop to Badge * AddressName cachin cleanups
skip-checks: true
* Handlers for OpaqueCall input/display types * Simplify disabled OpaqueCall
skip-checks: true
* Add unit tests for electron account management * Use tmp package in file store tests. * Enable @typescript-eslint/no-useless-constructor extension eslint rule. * Explicitly assign private field in constructor. Co-authored-by: Krzysztof Jelski <[email protected]>
skip-checks: true
* Adjust AccountName icon alignments * Simplify * 1px for whatever reason * EditButton sizing fix
skip-checks: true
skip-checks: true
* Display accountIndex on SideBar (as available) * accountIndex cache * Cleanup accountIndex re-renders * Unneeded accountIndex effect dep
skip-checks: true
* Society generator * Modal popup * Log accountId & hex * Spacing * Reduce for addressToBits
skip-checks: true
skip-checks: true
* Name query filter on targets * s/name/filter * Apply ?filter=<string> on all Filtered wrappers
skip-checks: true
skip-checks: true
* add tab and query * display accounts amount and conviction * delegation modal without react-component * add conviction dropdown * number not string * use string rather than accountId and KeyringAddress * all changing * use ConvictionDropdown from react-components * delegate column in accounts * with expander * with modals * ordering * Apply suggestions from code review Co-authored-by: Jaco Greeff <[email protected]> * ordering * implement suggestion and fix lint * Small layout adjustments with help text * Only delegate to owned accounts * Use AddressMini for delegation layout * Remove ununsed imports Co-authored-by: Jaco Greeff <[email protected]>
skip-checks: true
skip-checks: true
* Bump deps * Rewrite yarn
skip-checks: true
* Adjust payout toggle with days * Cleanups
skip-checks: true
skip-checks: true
* 0.51 * Completed on poll * Remove Toggle completely after poll
skip-checks: true
bdcbc1d to
b29a355
Compare
New changes:
LinterAs part of configuring the new Pioneer to work as a monorepo workspace I had to globally bump the eslint version and the versions of some plugins. This allows the current Pioneer to pass the linting, but also means that other projects will require some minor adjustments. I tried to temporary separate eslint-related dependencies completely between Pioneer and other projects, but it turned out hard to achieve and I believe we planned to update our eslint dependencies in the monorepo anyway, so perhaps this not too bad of a time to do this. Most of the related work is in this commit: bf24ab0 Merge conflicts and future upgradesI discovered a way to get a cleaner list of conflicts during the upgrade-from-upstream merge. We can achieve this by using: This still doesn't give us a perfect list of conclicts, ie. the changes in I tested this approach with an example upgrade of Re-activating
|
Related issues: #1033 and #1034
After trying out a few approaches I've choosen the following way of upgrading
polkadot-js/appspackages in Pioneer (this process shares some resemblances with #469):Part 1: The merge
iznikbranch): I createdpioneer-new-appsbranch on which I reduced the number of Pioneer packages to the required minimum set (Pioneer upgrade step 1: Find minimum set of required packages #1033) and then moved all remaning oldpolkadot-jspackages to another folder (old-apps) to avoid merge conflicts, but still have them easily accessible for a quick comparasion if needed (59d657c)polkadot-appsas git remote locally (git remote add polkadot-apps https://github.com/polkadot-js/apps.git)v0.51.1of the apps to a new local branch (git fetch polkadot-apps refs/tags/v0.51.1:refs/heads/polkadot-new-apps)git checkout polkadot-new-apps/pioneersubfolder:mkdir pioneerandls -a1 | grep -v ^pioneer | xargs -I{} git mv {} pioneergit commit -m "Move to subfolder"(4fb6768)git checkout pioneer-new-appsgit merge -Srecursive -Xno-renames polkadot-new-apps(prevent detecting renames now that we moved all the old apps away)/pioneerfolder (so mostly config files for babel, jest, TS, linter, docker etc.,README.mdand of coursepackage.json).--strategy-option=ours(0d5ea9e) and then merged the work from previosly adjusted branch withgit merge --squash -s resolve. This allowed use to have just one commit that represents all the adjustments that were implemented following that "simplified merge" , so it should be now be much easier to manage and review (b29a355).Part 2: Monorepo setup
Related commit: b29a355
I made all the necessary adjustments required for the new apps
build,lintandstartscripts to work in our monorepo setup.This of course required temporary excluding
joy-andold-appspackages from beeing considered, so I:"exclude"section ofpioneer/tsconfig.json.skip-buildfiles, which are recognized by polkadot's build script.eslintignoreOnce I managed to get the new apps working as a monorepo workspace I actually decided to temporary exclude them from the root monorepo workspaces to prevent the new dependencies from "messing up" other projects (CLI, network tests,
@joystream/typesetc.). I also modified Pioneer's CI checks a little bit, so that they correctly work in the current setup and I can take advantage of them when adjusting the packages before we get to the stage of upgrading the dependencies at the root level of the monorepo.Some adjustments that were made so far:
polkadot-js/apps(ie.babel.config.js,i18next-scanner.config.js,.eslintrc.js).polkadot-js/appsuses.yarn/releasesand.yarn/plugins, but this didn't seem to work inside our monorepo. Perhaps there was a better way to handle this, but removing those folders along with.yarnrcwas the quickfix I decided to implement for now.package.jsonlikereact-i18next(which didn't get hoisted frompackages/react-components) and a newer version oftypescript(which is required to build the new apps).polkadot-dev-build-tsbinary with our own script (b29a355#diff-23cc9ad2bdc8b3cb3418d168e9d2b0f2), since the original one had some issues with the process working directory (which I further explained in the linked file)header/headerrule as it was causing some issues (and will probably cause more once we start re-activatingjoy-packages)/pioneerwith the one generated by our version of yarnmadgeasdevDependencyto@joystream/typesTooling:
It looks like we're not using a lot of the features that the original repository provides, so I excluded some yarn scripts etc. during the merge, but we could later consider including and adjusting them (ie. there seems to be some setup in place that allows building the original repository as
Electronapp and also this: https://github.com/polkadot-js/apps#ipfs).I included the changes from #1071 in this PR so currently marking it as draft until those are merged.