Skip to content

Instantly share code, notes, and snippets.

Avatar

Nautilytics nautilytics

View GitHub Profile
@nautilytics
nautilytics / mui-style-utils.ts
Created October 5, 2022 22:36
An example of extending the MUI style utility functions and a custom theme
View mui-style-utils.ts
import {createStyled} from '@mui/system';
import {useTheme} from '@mui/material';
import type { MuiCustomThemeT } from './types';
export const muiStyled = createStyled<MuiCustomThemeT>();
export const muiUseTheme = useTheme<MuiCustomThemeT>();
@nautilytics
nautilytics / pull_request_template.txt
Last active September 13, 2022 19:50
A sample GitHub pull request template w a Release Notes section
View pull_request_template.txt
## Dev Summary
[Figma](link)
[JIRA](link)
<!-- A detailed outline of what this pull requests includes -->
## Release Notes
<!--
@nautilytics
nautilytics / percy-test.yml
Created September 12, 2022 22:01
A GitHub Action for running Percy across Storybook Scenarios
View percy-test.yml
name: Run Percy.io across Storybook Scenarios
on:
pull_request:
branches: [ main ]
jobs:
percy:
if: github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]'
runs-on: ubuntu-latest
@nautilytics
nautilytics / sample-tokens.json
Created September 12, 2022 21:03
A sample set of design tokens
View sample-tokens.json
{
"spacing": {
"xxxx-small": "2px",
"xxx-small": "4px"
},
"color": {
"brand-primary-125": "#D14334",
"brand-primary": "#FF5B4A"
},
"font-size": {
@nautilytics
nautilytics / Input.tsx
Created September 12, 2022 20:51
An example of using a custom theme to style a BaseWeb Input
View Input.tsx
import * as React from 'react';
import {
Input as BaseInput,
StyledEndEnhancer as BaseStyledEndEnhancer,
StyledStartEnhancer as BaseStyledStartEnhancer,
} from 'baseui/input'
import type { InputProps } from './types';
import { themedWithStyle as withStyle } from '../style-utils'
import { padding } from 'polished'
@nautilytics
nautilytics / ToggleButton.tsx
Last active August 5, 2022 14:59
An example of using a custom theme to style a MUI ToggleButton
View ToggleButton.tsx
import * as React from 'react';
import {
ToggleButton as MuiToggleButton,
styled,
} from '@mui/material';
import type { ToggleButtonProps } from '@mui/material';
import { border, margin, padding } from 'polished';
import { typography as labelTypography } from '../Typography/Labels/constants';
import { FontWeight } from '../constants';
@nautilytics
nautilytics / question-v1.ts
Last active April 24, 2022 19:22
The types related to Question
View question-v1.ts
type ValueNumberNodeType = {
value?: number,
};
type BasePredicate = {
nodeType: |
'ALL' | 'ANY' | 'AND' | 'BOOLEAN' | 'EQUALS_NUMBER' | 'GEOPOINT' | 'GREATER_THAN' |
'IS_INSIDE_REGION' | 'IS_NOT_SELECTED' | 'IS_SELECTED' | 'LESS_THAN' | 'NOT' |
'NOT_EQUALS_NUMBER' | 'NUMBER' | 'OR' | 'TEXT',
ref?: {
@nautilytics
nautilytics / boston-ma-target.geojson
Last active October 8, 2021 13:48
Target Locations in Major Cities
View boston-ma-target.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View deploy_data_api.md

Deploy Data API

Deploy to Dev [Tuesdays]

cd ~/Documents/GitHub/premise/data-api # path for data-api repo
git checkout master
git pull
GH_TOKEN=<personal_access_token> yarn version --minor
git push
@nautilytics
nautilytics / README.md
Last active September 21, 2021 22:02
Data Sample - Percent Positivity JSON Structure
View README.md

Proposed JSON Structure for Multiple Percent Positivity Approach UI

Notes

  • If values array is empty then we don't plot the small multiple chart
  • There should be only 1 selected = true approach for each state and that approach will be used in place of MAP_PERCENT_POSITIVE for the Map.
  • The selected=true approach will also be highlighted with a gold rectangle in the new UI percent positivity view.