Skip to content

JudicialDomicide/research.judicialdomicide.org

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PubPub

Collaborative Community Publishing

To Install

npm install

To Run Dev Mode

npm start

Navigate to localhost:9876

Storybook

To build and test components, we use Storybook. To run:

npm run storybook

Navigate to localhost:9001

To Build and Run Production Version

npm run prod

Navigate to localhost:9876

Pandoc

Latex

The Latex Buildpack we are using allows a texlive.packages file in the root directory to specify additional packages to be installed. List of available packages (I think... documentation on packages is a bit tough to find). Can be useful for understanding what's in collections. Not sure why it's so hard to find official documentation on texlive packages available.

Code Practices

Containers vs Components

The client side code of PubPub does follow a Container/Component split as is common in React-based sites. The structure and difference between the two in this repo is not exactly as described in the preceeding article. For this repo, the following describes how containers and components are differentiated:

Containers

  • Associated with a specific URL route
  • One a single container is used on a given URL route
  • Calls hydrateWrapper() to initialize React bindings after using server-side renered HTML for immediate display.
  • Holds the ground truth data for a given view. Often the ground truth data is passed into containers as props through hydrateWrapper(), but in cases where the ground truth data is being changed, the container will hold ground truth data in it's state.

Components

  • All other non-container components :)
  • Many components are used within a given URL route
  • Can store it's own state if needed for UX functionality - but should always update the ground truth data held in its parent container.
  • Can make it's own API requests when the functionality and layout of the pertaining request is contained within the single component. Though if this request influences the ground truth data, the component should be passed an updating function that allows it to update the ground truth data held in the container.

Commits

Preferred practice is to prefix commits with one of the following categories:

  • fix: for commits focused on specific bug fixes
  • feature: for commits that introduce a new feature
  • update: for commits that improve an existing feature
  • dev: for commits that focus solely on documentation, refactoring code, or developer experience updates

About

PubPub: Open publishing

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.6%
  • CSS 6.3%
  • Other 0.1%