Giter Club home page Giter Club logo

translation-helps-rcl's Introduction

translation-helps-rcl

Netlify Netlify Status CI Status Current Verison View this project on NPM Coverage Status

A React Component Library for rendering and editing scripture translation resources.

Development

Local Development

We use yalc[1] to do local development

Testing Locally With Other Apps

If you are testing locally with another app (e.g. gateway-edit) do the following:

  1. go to your local clone of translation-helps-rcl
  2. edit package.json:
    1. make "postpublish" non-runnable in scripts
    2. let $currentVersion = $localRepo/package.version let $newVersion = $incrementPatch $currentVersion in translation-helps-rcl/package.json NOTE: forall source-code changes perform this step BEFORE testing local consumer apps.
  3. run yalc publish
  4. change directories to consumer-app
    • ensure to checkout develop branch to test the changes
  5. run yalc add translation-helps-rcl@$newVersion
  6. run yarn
  7. start testing (typically yarn (dev | start))

consumer-app: the app that consumes translation-helps-rcl that needs to be tested with updates from translation-helps-rcl.

Dev Process / Publishing

The following is a psudo-code of our PR/QA Process

`let $latestPublishedVersion = <pull latest non-beta version from npm>`
1. in library
  `let $betaVersion = $incrementBetaVersion $latestPublishedVersion`
  `let $newLatestVersion = $incrementVersion $latestPublishedVersion` 
  1. publish $betaVersion to npm from local machine
  2. update package.json to $newLatestVersion 
  3. Create a commit and push
  4. Create PR 
    `let LibPrLink = PRlink`
    `let PRLibDesc = <write pr description>`
    1. mark PR as draft
    2. add reviewers to PR
    3. set PR status to in review
    4. `let AppReviewLinks = LibPrLink`

6. ∀.app ∈ consumer-apps 
  1. update the `<lib>@$latestPublishedVersion` to `<lib>@$betaVersion` in app/package.json
  2. create a commit and push
  3. create a PR
    `let PRLink`
    `let PRdescription = <write pr description> + <write testing steps>`
    `AppReviewLinks += PRLink`
    1. mark PR as draft
    3. ensure a netlify deploy preview has been created
    2. add reviewers to PR
    4. set PR status to in review
    5. append `PRdescription` to `LibPRDesc`

7. `∀pr ∈ lib. if reviewPass pr (merge pr) (fix pr)`

8. in library
  1. pull and checkout to `<main>` branch
  2. publish $newLatestVersion to npm from local machine

9. `∀pr ∈ consumer-apps`
  1. `if reviewPass pr`
    1. update `<lib>@$betaVersion` to `<lib>@$newLatestVersion` in app/package.json 
    2. commit and push
    2. merge pr
    3. else `(fix pr)`

10. `∀pr ∈ lib <> consumer-apps >> setAsInQAStatus pr`
11. Send discord message to QA (DM to Elsy, Daniel) with `LibPrLink <> first AppReviewLinks`
12. `∀pr ∈ lib <> consumer-apps. if passQa pr (celebrate) (create new issues and start dev proces over)`

Peer Dependencies

This package requires @material-ui v4 core, icons, and lab. Material-UI Installation

The CSS Styles implementation uses the updated version and is incompatible with v3.

A few components use the Lab components such as the Skeleton for the infinite scrolling effect.

[1]: todo include link [2]: this might could be removed since the management of package versions could be automated away. None-the-less when the version needs to be updated and what it needs to be updated to is more complicated than meets the eye. [3]: TODO: automate the process for fetching current npm version

translation-helps-rcl's People

Contributors

abelpz avatar jincypjose avatar joel-c-johnson avatar kintsoogi avatar klappy avatar larsgson avatar mandolyte avatar mannycolon avatar photonomad0 avatar superdav42 avatar thenerd247 avatar

Watchers

 avatar  avatar  avatar  avatar

translation-helps-rcl's Issues

Non-functioning Demos

The following demos either missing (even tho they have sections in the demo page):

  • CircularProgress
  • DraggableCard
  • Scrollable

Add support for TWL

TWL files have a list of words for a given bible reference linking to the markdown files

SPIKE [2]: `Error: error:0308010C:digital envelope routines::unsupported` while running styleguidest

DoD:

This error doesn't occur while running styleguidest

Details:

The following error occurs when running the test application:

$ yarn start
yarn run v1.22.19
$ styleguidist server
ℹ 「wds」: Project is running at http://localhost:6060/
ℹ 「wds」: webpack output is served from undefined
ℹ 「wds」: Content not from webpack is served from /Users/noah/src/translation-helps-rcl
You can now view your style guide in the browser:

  Local:            http://localhost:6060/
  On your network:  http://172.16.103.170:6060/

Error: error:0308010C:digital envelope routines::unsupported
Error: error:0308010C:digital envelope routines::unsupported

From what I gather this is a compatibility issue between Node16 and Node18.

Current solutions involve either:

  1. a global environment downgrade to Node16
  2. Using tools like nvm
  3. run the application using NODE_OPTIONS=--openssl-legacy-provider yarn start if they are running Node18.

Essentially this bring us to the question: Here are a few things to consider:

  1. Should we begin upgrading this lib to support Node18
  2. Should we begin enforcing Node versions in the package.json?
  3. Do we still need Node16 support in this library? (3) above works for me and I do not notice any broken functionality once the styleguidest app builds and runs. I'm not sure what affect running higher versions of node will have on other machines though.
  4. How wide-spread is this library and how many of those dependents use Node16? That is, what would the "damage report" be if we did an upgrade?

Personally I would recommend upgrading to at least Node18 as sticking to latest LTS versions are typically a good idea.

If we decide to stick with Node16 for now I would recommend we use the engines config in package.json to ensure global compatibility of this library across other apps. New developers (especially those new to JS development) would most likely have the latest version of the LTS Node installed and will run into this issue. There is no mention of using Node16 in the README, however it would be much better to enforce this technically (rather than relying on developers to parse a README file).

This same issue appears in other apps (such as gateway-edit) and could benefit from an upgrade away from Node16 as well.

Allow closeable when a toolbar is specified

currently if the property closeable is true, then a tool bar cannot be used. Code in Card.js:

        {closeable ? (
          <CloseIcon
            id='settings_card_close'
            className={classes.pointerIcon}
            onClick={onClose}
          />
        ) : (
          <FlexDiv>
            <Extensible onRenderItems={onRenderToolbar}>
              {alert && (
                <IconButton
                  aria-label='warning'
                  onClick={onAlertClick}
                  className={classes.margin}
                  key='alert-button'
                >
... elided ...
            {!disableSettingsButton && (
              <MoreVertIcon
                id={cardMenuId}
                className={classes.pointerIcon}
                onClick={onMenuClick}
              />
            )}
          </FlexDiv>

Helps-rcl content loading issue react-18

We ( Autographa ) are facing an issue on loading contents ( Tn, Tq, Ta etc. ) using the helps-rcl. The issue arise when the react version updated to 18. This issue is only happening when the contents load using rcl and not for the pre fetched (offline) contents displayed using the rcl. Hope the video in the link gives more clarity on the issue. Helps-rcl-issue-react-18

Refactor `DOOR43_CATALOG`

The following functions need DOOR43_CATALOG constant to be abstracted.

Process:

see unfoldingWord/gateway-edit#460

newVarName = "door43Catalog"

main = do
  sequence refactorDoor43Catalog ["loadGlBible", "getGlAlignmentBiblesList"]
  removeConstant DOOR43_CATALOG
  sequence abstract allRepositoriesUsingTranslationHelps

refactorDoor43Catalog =
  def
  >> replaceName "DOOR43_CATALOG" newVarName
  >> abstract

abstract = id >|< abstractLocalFunc

abstractLocalFunc = 
  prependVarNameToFuncDef newVarName
  >> callsites 
  >> sequence (applyVar newVarName >> abstract)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.