datahub icon indicating copy to clipboard operation
datahub copied to clipboard

Update CKAN example to use new portaljs components

Open rufuspollock opened this issue 3 years ago • 9 comments

We already have examples/catalog and we need to bring it up to date ...

Acceptance

  • [ ] examples/catalog is updated to using portaljs components where relevant
  • [ ] deployed and working

Tasks

Analysis

  • [ ] Decide whether we want to adapt metastore lib or not ... (may just be simpler for people to use the core client library to get what they need ...)
    • [ ] in this case current metastore-lib-js really becomes github-dataset-store-js ...
    • [ ] can use ckan.js for ckan wrapper (and maybe merge ckan-client-js ...)

rufuspollock avatar May 19 '21 14:05 rufuspollock

@risenW i believe we have already done a bit of this? Can you confirm ...

rufuspollock avatar Jun 24 '21 09:06 rufuspollock

@risenW I've already started looking into this. I'm assuming that latest work is in the main branch but if you have any work done for it, please share.

anuveyatsu avatar Aug 12 '21 18:08 anuveyatsu

I have deployed the latest home page changes here - https://catalog-portal-js-msd63kmoe-datopian1.vercel.app/

Any idea why CSS is broken in production while it works fine in dev mode?

cc @risenW @rufuspollock

anuveyatsu avatar Aug 13 '21 13:08 anuveyatsu

@risenW i believe we have already done a bit of this? Can you confirm ...

Yes, see https://github.com/datopian/portal.js/pull/566

risenW avatar Aug 16 '21 07:08 risenW

I have deployed the latest home page changes here - https://catalog-portal-js-msd63kmoe-datopian1.vercel.app/

Any idea why CSS is broken in production while it works fine in dev mode?

cc @risenW @rufuspollock

It probably has to do with tailwind purging. @rufuspollock did some work https://github.com/datopian/portal.js/issues/571 and https://github.com/datopian/portal.js/commit/42638c95ad9c58dd06493ccedf869894eb894ad4 on this.

risenW avatar Aug 16 '21 07:08 risenW

@anuveyatsu any update on this?

rufuspollock avatar Aug 23 '21 12:08 rufuspollock

@rufuspollock css issues mostly resolved but still fixing dataset/resource pages. Latest work is in https://catalog-portal-js-datopian1.vercel.app/

anuveyatsu avatar Aug 23 '21 14:08 anuveyatsu

@anuveyatsu great - when will this be finished and live?

[Also PS: as said last week we don't need to (re)use most of the "core" components e.g. Nav etc (that's not really needed in core). We can just create the React components in this example. Of course, stuff like Table view can be reused ...]

rufuspollock avatar Aug 24 '21 12:08 rufuspollock

The latest version is deployed now:

https://catalog-portal-js.vercel.app

For dataset/resource pages, please, use population and/or GDP datasets because only those are pushed to DataStore at the moment:

  • Dataset page: https://catalog-portal-js.vercel.app/@datopian-support/population-data
  • Resource page: https://catalog-portal-js.vercel.app/@datopian-support/population-data/r/Population (using core Table component which has some issues, e.g., table column width is weird)

Note that we still have some layout/CSS issues but I think they are minor.

Re metastore lib, note that we're using Apollo client: https://www.apollographql.com/docs/react/api/link/apollo-link-rest/ so I think ckan.js doesn't work for this case, eg, we want to use CKAN API directly.

cc @rufuspollock @risenW

anuveyatsu avatar Aug 25 '21 11:08 anuveyatsu

FIXED in 2021. (And now obsoleted by a new version of ckan example).

rufuspollock avatar Oct 31 '23 23:10 rufuspollock