I'm a frontend web engineer - building performant, high-quality user interfaces. Formerly, a robotics teacher.
Above stats generated with: tipsy/profile-summary-for-github
An extremely lightweight React component to declaratively (and elegantly) plot shapes on an inline SVG
Home Page: https://bare-minimum-2d.netlify.app
License: MIT License
I'm a frontend web engineer - building performant, high-quality user interfaces. Formerly, a robotics teacher.
Above stats generated with: tipsy/profile-summary-for-github
CRA installs babel jest in the example directory which is unused.
This babel jest causes problems because we need to have babel jest on the root directory,
having two separate versions of babel jest (and related libraries) - one for the root directory and the other to its child directory (in this case is the child directory is the example directory)- is preventing a successful build.
The solution is to use parcel instead of CRA. It will not install babel jest (and related libraries) in the example directory
Add an element type called "markers"
If an element is of type markers
, you should specify amarkerType
like
"plus"
"plus-circle"
"plus-square"
"triangle"
"mouse-pointer"
"arrow-up-circle"
"arrow-up"
To use, you can pass it to the data array like so:
const markers1 = {
x: [0, -50, -50, 50, 50],
y: [0, -50, 50, 50, -50],
theta: 0,
color: 'red',
opacity: 0.75,
size: 5,
type: 'markers',
markerType: 'arrow-up',
id: 'marker1'
}
const markers2 = {
x: [0, 0, 0, 0],
y: [-20, -10, 10, 20],
theta: -45,
color: 'purple',
opacity: 0.75,
size: 3,
type: 'markers',
markerType: 'plus-circle',
id: 'markers2'
}
$ npm login --registry=https://npm.pkg.github.com --scope=@mithi
$ npm publish --dry-run
https://docs.npmjs.com/misc/scope
You can associate a scope with a registry at login, e.g.
npm config set @myco:registry http://reg.example.com
Once a scope is associated with a registry, any npm install for a package with that scope will request packages from that registry instead. Any npm publish for a package name that contains the scope will be published to that registry instead.
v0.1.12 on GitHub registry
https://github.com/mithi/bare-minimum-2d/packages/352301
v0.1.11 on NPM registry
https://www.npmjs.com/package/bare-minimum-2d
But there is actually no difference between the two versions
npm publish
will publish to the github registry because of .npmrc
file below
https://github.com/mithi/bare-minimum-2d/blob/master/.npmrc
which has
registry=https://npm.pkg.github.com/mithi
BUT BEFORE PUBLISHING, you need to edit package.json
https://github.com/mithi/bare-minimum-2d/blob/master/package.json
to be
{
"name": "@mithi/bare-minimum-2d",
"version": "0.1.12",
}
and to publish to the npm
registry, you'd have to remove .npmrc
file
and change the name back to { "name": "bare-minimum-2d" }
This is of course a hack which should be resolved.
Please refer to the following in the docs:
https://docs.github.com/en/actions/language-and-framework-guides/publishing-nodejs-packages#publishing-packages-to-npm-and-github-packages
Note: If you need to publish to registries that have different scope prefixes, you'll need to modify the package.json file on the runner to change the scope prefix. For example, if you publish a package to the @mona scope for npm and @octocat scope for GitHub Packages, you can replace the @mona scope with @octocat in the package.json file on the runner after publishing to npm and before publishing to GitHub Packages.
Add a note in demo3 that the interaction only works on desktop in the <DemoSticky />
component
https://github.com/mithi/bare-minimum-2d/blob/master/example/src/demo3/demo.js
Or it might be better to add an "on touch listener"
Please also remove this weird line space here:
bare-minimum-2d/example/src/demo1/demoProps.js
Lines 134 to 137 in 07f8e0f
Setup code climate
Setup coveralls/codecov
Setup github actions for running tests
Setup github actions to publish upon release
Update badges to be the same as in:
Currently, when we specify the x-range the y-range of the container the default plot would be like so:
yRange/2
|
Q2 | Q1
-xRange/2 -------(0,0)--------- xRange/2
Q3 | Q4
|
-yRange/2
Sometimes we only need one of the following
We should be able to specify, so that we don't waste space in the screen that don't have markers.
I'm thinking the API would be something like:
const container = { xRange, yRange, color, opacity, quadrants }
Where quadrant is a string that could contain "Q12"
, "Q3"
, "Q1234"
etc
We have to change this part
Lines 60 to 61 in 2d3dc91
to not be hard coded and be generic
Hi,
I'd like to append text labels to each marker:
these should also make sure not to overlap with other text markers.
please let me know if this exceeds the boundaries of bare minimum ๐ .
Would It be possible to define a marker type as a plug-in? such a plug-in could be used to solve #1
https://jestjs.io/docs/en/snapshot-testing
another test example: https://github.com/mithi/bare-minimum-3d/tree/master/test
https://github.com/mithi/bare-minimum-2d/blob/master/example/src/demo1/demoProps.js
https://github.com/mithi/bare-minimum-2d/blob/master/example/src/demo1/demo.svg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.