Git Product home page Git Product logo

react-value-flash's People

Contributors

brian-mcallister-lab49 avatar brianmcallister avatar daniel-canas-lab49 avatar dependabot[bot] avatar erick-rodriguez-lab49 avatar feng-chen-lab49 avatar

Stargazers

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

Watchers

 avatar

react-value-flash's Issues

Package.json issues

I'm using 0.1.7 from npm.

In package.json:

  "main": "dist/index.js",
  "module": "dist/index.modern.js",

These point to index.js & index.modern.js, which do not exist.

My app won't boot unless I hard-change these to dist/Flash.js.

  "main": "dist/Flash.js",
  "module": "dist/Flash.js",

I tried to create a PR on master, but it seems like this codebase is different from 0.1.7.

Custom component rendering options (perhaps with render props).

Right now, the user has no control over the DOM (simple as it is right now).

We could open up the ability for a user of this library to provide a render prop, and then the users of this library will have complete control over the structure of the DOM.

Migrate relevant tests to Storybook play functions.

I've already created one play function for one of the stories, here's the relevant snipped from a recent commit:

CurrencyFormatter.play = async ({ canvasElement }) => {
const canvas = within(canvasElement);
await expect(canvas.getByText("$20,000.00")).toBeInTheDocument();
await userEvent.click(canvas.getByTestId("first-button"));
await expect(canvas.getByText("$20,001.00")).toBeInTheDocument();
};

I've also validated that we can run it locally (with npm run test-storybook) and in CI (which uses Chromatic to run the interaction tests).

Let's look into doing a few things:

  1. Move all relevant tests out of standalone Jest and into Storybook play functions. This gives us the ability to rely on the existing stories that have been written to set up test cases, and also could (if we move all tests) allow us to simply drop all the testing dependencies.
  2. Collect coverage stats and forward them on to Codecov.

Fully migrate to the new eslint configuration.

Probably not something we want to do right away, but I've taken the first steps towards this. There's more documentation on this page: https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new. Here's a screenshot as of this writing:

image

Right now, I do have the ESLINT_USE_FLAT_CONFIG env var set to false so that we can maintain compatibility with other tools. There's additional setup in the repo to keep things working, but should be cleaned up.

For example, we're needing to set these VS Code preferences to keep things functional: microsoft/vscode-eslint#1518 (comment)

I don't know what would be required or available in other IDEs.

Add ability to radix align numbers.

This could potentially be a bit of a tricky one... but, it's likely that you're going to use this component inside some kind of grid. In that case, you'll have many rows of data, and one or more columns in those rows with flashing numbers.

We could provide an option to pad the numbers such as that one column in a grid could be "radix aligned", or, aligned to the decimal point. For example, this is what this would look like now:

row1 | 123.45
row2 | 23.45
row3 | 1.45

...and this is what we'd want it to look like:

row1 | 123.45
row2 |  23.45
row3 |   1.45

This would make large grids of numbers much easier to scan. The catch is that this would really only work with fixed width numbers. I don't see any way to "enforce" that in this package, but we could simply document and provide screenshots to indicate that this is something a user would need to configure on their own.

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.