Closed pkalita-lbl closed 1 year ago
I'll try to have a peek/runthrough tomorrow, and then follow up with questions.
I checked it out and also consulted with the team and happy to see its 98% there! It seems like on my local test of web/dist/index.html, as well as the localhost http://localhost:8080/ yarn version:
I could find time this week to try to resolve those things. No other dev. planned for this week.
Thanks for taking a look and testing! I'm happy to look into the issues you found but I'm not fully understanding the steps to reproduce the problems you saw. Here's what happens when I use the Next Error button: https://user-images.githubusercontent.com/102547565/178542044-464e91c4-b834-4acf-9bf9-538dc5a89306.mov
And vertical scrolling: https://user-images.githubusercontent.com/102547565/178542754-9c67e6c0-2bd7-4693-b980-633a872aadcd.mov
Well that's working perfectly at your end! Are you on a Mac btw, and using Chrome? And was that via http://localhost:8080/ or via file explorer? e.g. file:///Users/damion/Documents/GitHub/DataHarmonizer/web/dist/index.html after the yarn web.build is done?
Yes I am on a Mac and using Chrome. I recorded those while using the webpack-dev-server (localhost:8080
) but I just tried the bundled version (opening web/dist/index.html
) and saw the same behavior.
Maybe we should just do a quick call some time to see what's going on? It's entirely possible I didn't properly document some part of the workflow.
Hi Patrick, I see you've made this all up to date with DH v1.3.4 . I'm merging with master now!
Should I just drop yarn.lock or try repairs in dependabot list: https://github.com/cidgoh/DataHarmonizer/security/dependabot
Ah sorry I don't have permission to view this repo's dependabot alerts. Don't remove yarn.lock
that's important to keep checked in. If the issues have a fix dependabot will generally open a PR automatically, and I generally merge those without much scrutiny. Sometimes dependabot flags issues that don't have a fix published yet, and in that case I'm not sure if there's much else to do other than read what the issue is and see if this code could be affected by it.
Maybe you have permission now to view dependabots? I added you as a write contributor.
d.
There are a lot of changes here so I'd be glad to walk anyone through them in more detail. Just reach out to me if that would be helpful for you.
The changes fall into these categories:
package.json
, eslint, prettier, webpack and rollup configs). Removed manually copied-in third party dependencies (used to be inlibraries
folder); these are specified inpackage.json
now.script/data-harmonizer
have migrated into the three classes (DataHarmonizer
,Toolbar
,Footer
) inlib
. HTML snippets and CSS required by those classes are also inlib
.lib/utils
contains stateless functions that are used by one or more of the main classes.lib/images
contain images used by the Getting Started carousel provided byToolbar
.web
. This replacesmain.html
,main.js
, andmain.css
that were previously at the top level of the repo. Thetemplates
directory has been moved toweb/templates
to emphasize that those templates are used by that canonical interface and are independent of the core library.var SCHEMA =
part was removed).The development workflow with this branch is:
yarn
to install dependencies.yarn dev
to start the webpack dev server for the canonical DataHarmonizer interface onlocalhost:8080
. This serves as interface for testing and debugging the core library components (in thelib
directory) and that interface itself (theweb
directory).yarn build:web
to bundle the canonical interface. You can openweb/dist/index.html
in your browser to test the distributable bundle and verify it runs in "offline".yarn build:lib
to bundle the library components intolib/dist
. That’s what will be published for downstream clients to use (there will be some follow-up work to document and automate that process). For now there isn’t much interesting to do with it, unless you really want to go the extra mile and consume your local DH project in another local project to see that working.A few points that may warrant discussion:
Toolbar
class, they won't incur the extra bundle size. Regardless, even for ease of updating I wonder if that carousel could be replaced by a link to documentation on the GitHub Wiki.web/templates/menu.js
now includes information about the schema and export formats for each folder. This replaces theSCHEMA
andEXPORT_FORMATS
global variables that were previously used to manage that information. Instead of having theToolbar
class have knowledge about a specific file system structure, I added these two fields to the objects inmenu.js
that can either be inlined values (an object forschema
or an array forexportFormats
) or functions that provide such values. The dynamic imports inmenu.js
are a little awkward looking, but at least it keepsToolbar
's interface quite generic. Curious if anyone has alternate ideas.scripts/linkml.py
. A schema JSON file can be generated from the LinkML YAML on the command line with:gen-linkml --format json --mergeimports schema.yaml > schema.json
.DataHarmonizer
class the same as it was before as much as possible. However I did attempt to remove any references to DOM elements inDataHarmonizer
that it didn't create itself. That required replacingchangeColVisibility
with 4 more specific methods (showAllColumns
,showRequiredColumns
,showRecommendedColumns
,showColumnsBySectionTitle
) Personally I prefer this type of more explicit interface, but that's open to discussion. (It may also be worth in the future looking at what methods and properties onDataHarmonizer
should be public and make the rest private.)Fixes #312