datopian / datahub

🌀 Rapidly build rich data portals using a modern frontend framework
https://datahub.io/opensource
MIT License
2.18k stars 325 forks source link

Developer FAQs for PortalJS #878

Open luccasmmg opened 1 year ago

luccasmmg commented 1 year ago

A data portal is built with multiple features. We want to identify and list the most common ones and explain what is the easiest way to do them using PortalJS.

Acceptance

Tasks

Questions

List of features

List of features

Notes

Improvements to PortalJS

Currently, everything in the list can be done, since PortalJS runs over Next.js, but of course, that's too cumbersome.

The means to make those features available on PortalJS are:

Provider component

We could have a , similar to SessionProvider, ThemeProvider, etc.

This could be helpful to avoid copy/pasting code e.g. check if there's a GA token in the configs and setup the pageview call on route change events.

Specifically, everything in here could be done inside this provider and users would just have to wrap their apps inside it https://github.com/datopian/flowershow/blob/main/packages/template/pages/_app.tsx --

E.g:

//  _app.js
import siteConfig from "content/config.js"

const MyApp = ({ Component, pageProps }: AppProps<CustomAppProps>) => {

return <FlowershowProvider config="config"> 
    <ThemeProvider>  //  Probably this could go inside the FlowershowProvider as well
      <Layout {...layoutProps}>  // ... and this
        <Component {...pageProps} />
      <Layout />
    <ThemeProvider />
  <FlowershowProvider />
}
olayway commented 1 year ago

@rufuspollock can we close this and open an issue for v2?

rufuspollock commented 1 year ago

@olayway why do we want to close and open a follow up - i'd want to at least keep overall list in one place so easy to follow what we have done. We can open subissues to this quasi-epic e.g. for recommendations for improvements to core libraries.

olayway commented 1 year ago

@olayway why do we want to close and open a follow up - i'd want to at least keep overall list in one place so easy to follow what we have done. We can open subissues to this quasi-epic e.g. for recommendations for improvements to core libraries.

Because I feel like this is usually what we do (open issue for V2 etc) 😅 But ok, let's leave this one.

rufuspollock commented 1 year ago

@olayway yes on this one it's a lot easier to see the progress because we are working through a specific list for now - i understand about often splitting especially as work flows across iterations. As i said we can have sub-issues for stuff like improvements to core libs.

popovayoana commented 1 year ago

@olayway @luccasmmg @demenech @anuveyatsu can someone update the issue? i just want to understand if we're still working on these items and if we're following the plan. thanks 🙏

demenech commented 1 year ago

can someone update the issue? i just want to understand if we're still working on these items and if we're following the plan. thanks pray

Hi @popovayoana . I'm not sure about the state so I'm going to leave it for @luccasmmg

luccasmmg commented 1 year ago

@popovayoana the current version of this is on https://portaljs.org/howtos but no work has been done on it for a few weerks, this issue is kinda of an epic so it will not get closed for the time being, but technically the first version of this has already been done.