Giter Site home page Giter Site logo

island-is / island.is Goto Github PK

View Code? Open in Web Editor NEW
282.0 282.0 48.0 283.07 MB

Monorepo for Iceland's digital services.

License: MIT License

JavaScript 3.56% TypeScript 95.90% Makefile 0.01% Dockerfile 0.01% HTML 0.02% Shell 0.13% CSS 0.02% SCSS 0.06% Handlebars 0.03% Ruby 0.02% Java 0.03% C 0.01% Objective-C 0.01% Objective-C++ 0.01% Swift 0.01% MDX 0.19% Mustache 0.01%

island.is's People

Contributors

albinagu avatar alexdiljar avatar arnarkari93 avatar atligudl avatar barabrian avatar darrikonn avatar davidbachmann avatar dependabot[bot] avatar disaerna avatar eirikurn avatar gudjong avatar jeremybarbet avatar karlarnar avatar kksteini avatar margretfinnboga avatar oddsson avatar pshomov avatar qdd1 avatar rikkiabb avatar runarvestmann avatar saevarma avatar sindrig avatar stefanhar avatar stjanilofts avatar thordurhhh avatar thorkellmani avatar thorrik58 avatar unakb avatar unnarb avatar valurefugl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

island.is's Issues

Rebuilding a commit can be against a wrong "last good build"

Re-triggering a build on an old commit would cause it to get "affected" changes against the last good build on the branch which might be a much newer build and not the last good build before the commit to be rebuild.
The code to discover Git SHAs to discover is something like this:

LAST_GOOD_BUILD=`git log --format=%H --first-parent "$BRANCH" | node .github/actions/dist/index.js`

but should be more like

NUMBER_NEWER_COMMITS=`git log --format=%H --first-parent "$BRANCH"  $GITHUB_SHA... $BRANCH | wc -l`
LAST_GOOD_BUILD=`git log --format=%H --first-parent "$BRANCH" | tail -n +${NUMBER_NEWER_COMMITS+1}  | node .github/actions/dist/index.js`

Skilavottord-ws crashes on startup

Here is the log:

(node:1) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, scandir '//root'
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

PR run failed. fatal: reference is not a tree

Sometimes when I push to a new branch and create a PR I get this error from the pipeline:

Run git checkout $GITHUB_SHA
fatal: reference is not a tree: 7c5875c3b266acae4a2e61ca42eb3ae223b560d2
##[error]Process completed with exit code 128.

Examples:
https://github.com/island-is/island.is/runs/886903399
https://github.com/island-is/island.is/runs/886908881

Usually all I need to do is to do an empty commit and force push. Might need a few of those to make through this build step.

I think this relates to actions/checkout#23.
The solution there is to change to actions/checkout@v2 in the workflow build config.

Switch to stricter TypeScript config

The default TypeScript config from NX does not have any strict flags set, eg it allows implicit any. This makes it easy to forget to add type definitions to expressions and declarations and end up with unsafe untyped code.

It's an easy change in tsconfig.json, however, we already have a lot of code this will break.

To start this migration we should turn off strict in the root tsconfig. For projects that have a significant number of errors with this flag set, we can unset it in the project-specific tsconfig. Later, someone (optimally from the project team) has time to fix these type issues and re-enable strict mode.

Create reusable field wrapper components for react-hook-form

Basically what is inside libs/application/form/src/components/fields/**/* could be made more generic and moved to island-ui/core.

Currently island-ui/core only has wrappers around Formik components, which are named Field*.
But we've come to a decision to replace Formik for react-hook-form. Therefore we'll need to create similar wrapper components for that as well. Might name them *Controller, e.g. InputController.

The deadline for that is as soon as possible to avoid other developers from choosing Formik for new projects. Currently, only gjafakort uses Formik -> and that project will be removed in the beginning of next year.

Avoid `source` in build.yml

Avoid using source as a way to get environment variables from scripts in /ci. Instead, just get them via stdout.

Created after discussions in #1152

Call for help 👉 Textarea component

In our project we are using a textarea field that looks like this 👇

Screenshot 2020-09-10 at 19 40 09

What I need is to be able to choose if an input field should be rendered as a textarea or input via a prop when using the input component. I tried implementing this myself but was unable to get working due to typescript errors regarding the merging of refs in the Input component. Can anyone please help?

Create ADR for form library

Currently, island-ui has many components which build on top of Formik. This was chosen by default, but its worth investigating other form libraries and creating an ADR for it.

Library for shared assets

Currently we have a few applications which are duplicating assets like favicons.

We should avoid duplicating assets. Instead we can create a shared library that contains these assets.

From there, they can be imported using webpack, or we can copy them to a public folder in the build step.

Fix missing login.js

It affects seems gjafakort, vidspyrna and loftbrú. For example for Loftbrú when you press “Sjá réttindi” tries to load file login.js which is missing. This is causing problems in monitoring.

Add testId to interactive island-ui components

Our shared components need props to help with automated testing.

Interactive components should support a prop called testId, which is forwarded to data-testId on the primary interactive element in the DOM. This kind of attribute works well with Cypress and testing-library.

If a component has sub-components, it can use its testId as a prefix for those components, eg:

const Calendar = ({ testId = 'calendar, ...stuff }) =>
  <>
    ...
    <Button testId={`${testId}.nextMonth`} />
  </>

Run docker containers as not-root

After the most recent Dockfile changes related to avoiding generating different layers for the same node modules we needed to add the code assets to the container as root but executed it as a lower privileged user - runner.

That change brought forward the fact that when running certain types of containers - (GraphQL for example, maybe more), they are attempting to write into the current folder.
This is a security issue and we cannot allow to write into files in the current folder. The correct way would be to write content to the temp area.

We have temporarily allowed the code to run as root but we need to fix this ASAP.

Translation system

For system strings we're using rosetta and in-repo translation resources. This will not scale very far.

  • It should be easy to set up translated user interfaces.
  • Apps may be client-side or have server-side rendering.
  • We want to namespace translations and only fetch translations that are needed for each context.
  • It should be easy to add a new string to be translated, while still supporting a namespace and a description that gives context to editors/translators.
  • It should be possible to configure deflection and pluraility rules for different languages.
  • Editors should be able to tweak the copy and translators should be able to submit translations without involving developers.

One proposal is to combine Contentful with i18next (or something home built). We should create an ADR for this.

Prepare judicial-system for deployment to Prod

The following is needed:

  • A prod database

  • /k8s/judicial-system/AUTH_JWT_SECRET - can be set to any secret string

  • /k8s/judicial-system/DB_PASSWORD - production db password provided by Andes

  • /k8s/judicial-system/NOVA_PASSWORD - can be copied from /k8s/gjafakort/NOVA_PASSWORD on prod - we are sharing the sms gateway

  • /k8s/judicial-system/JUDGE_MOBILE_NUMBER - 8999291

  • /k8s/judicial-system/DOKOBIT_ACCESS_TOKEN - Dokobit api secret provided by Kolibri - má afrita frá dev til að byrja með

  • /k8s/judicial-system/USER_SEED - user seeding provided by Kolibri - má afrita frá dev til að byrja með

  • /k8s/judicial-system/EMAIL_FROM - [email protected]

  • /k8s/judicial-system/EMAIL_FROM_NAME - ??? island.is ???

  • /k8s/judicial-system/EMAIL_REPLY_TO - [email protected]

  • /k8s/judicial-system/EMAIL_REPLY_TO_NAME - ??? tómur strengur ???

  • An AWS service role with permission to send email via SES

  • Helm definitions https://github.com/island-is/helm/pull/78

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.