bobaekang

bobaekang

social scientist turned software engineer

Member Since 5 years ago

Chicago, IL

Experience Points
9
follower
Lessons Completed
11
follow
Lessons Completed
81
stars
Best Reply Awards
60
repos

1225 contributions in the last year

Pinned
⚡ Multiple entry points setup for Vue 3 + Vite
⚡ Use modules in R natively
⚡ ICJIA Research Hub main.
⚡ My personal website/blog:
Activity
Nov
23
1 week ago
Activity icon
delete

bobaekang in chicagopcdc/data-portal delete branch chore/test-explorer-table

deleted time in 6 days ago
push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Improve jsdoc && proptypes for ExplorerTable

bobaekang
bobaekang

Merge pull request #284 from chicagopcdc/chore/test-explorer-table

Write basic tests for

commit sha: 90498457561c3e80aa293524e193cac0829dc6c4

push time in 6 days ago
pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Write basic tests for <ExplorerTable>

This PR add basic tests for <ExplorerTable> component in preparation for the upcoming migration to React Table 7.

The tests added by this PR do not cover the full range of the component's behavior, but the PR is meant for taking the first step toward it.

pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Write basic tests for <ExplorerTable>

This PR add basic tests for <ExplorerTable> component in preparation for the upcoming migration to React Table 7.

The tests added by this PR do not cover the full range of the component's behavior, but the PR is meant for taking the first step toward it.

Activity icon
delete

bobaekang in chicagopcdc/data-portal delete branch chore/refactor-explorer-table

deleted time in 6 days ago
Activity icon
created branch

bobaekang in chicagopcdc/data-portal create branch chore/refactor-explorer-table

createdAt 6 days ago
Activity icon
created branch

bobaekang in chicagopcdc/data-portal create branch chore/test-explorer-table

createdAt 6 days ago
Activity icon
delete

bobaekang in chicagopcdc/data-portal delete branch chore/refactor-explorer-table

deleted time in 6 days ago
pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Refactor <ExplorerTable>

This PR refactors <ExplorerTable> component in preparation for the upcoming migration to React Table 7.

The focus of this refactoring effort includes:

  • Use function component
  • Extract simple methods as function outside the component
  • Simply and reduce boilerplate
push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Simplify getWidthForColumn() method

bobaekang
bobaekang

Simplify buildColumnConfig() method

bobaekang
bobaekang

Simplify fetchData() method

bobaekang
bobaekang

Simplify buildNestedArrayFieldColumnConfigs() method

bobaekang
bobaekang

Extract getWidthForColumn() method as function

  • rename & refactor
bobaekang
bobaekang
bobaekang
bobaekang

Replace switch with if statements

bobaekang
bobaekang

Extract function to get cell element

bobaekang
bobaekang

Extract buildColumnConfig() for nested field as method

bobaekang
bobaekang
bobaekang
bobaekang

Refactor ExplorerTable into function component

bobaekang
bobaekang

Remove unused defaultValue param

bobaekang
bobaekang

Return early if tableConfig.fields is empty

bobaekang
bobaekang

Remove redundant isLocked check for Subcomponent

bobaekang
bobaekang

Destructure guppyConfig/tableConfig values to use

bobaekang
bobaekang
bobaekang
bobaekang

Resolve spurious type error

bobaekang
bobaekang

Merge pull request #283 from chicagopcdc/chore/refactor-explorer-table

Refactor

commit sha: 648813d8cdcc32976849ab47bdd4bd6b7dfd8e7a

push time in 6 days ago
Activity icon
fork

bobaekang forked remix-run/remix

⚡ Build better websites
bobaekang MIT License Updated
fork time in 6 days ago
Nov
22
1 week ago
pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Refactor <ExplorerTable>

This PR refactors <ExplorerTable> component in preparation for the upcoming migration to React Table 7.

The focus of this refactoring effort includes:

  • Use function component
  • Extract simple methods as function outside the component
  • Simply and reduce boilerplate
Activity icon
created branch

bobaekang in chicagopcdc/data-portal create branch chore/refactor-explorer-table

createdAt 1 week ago
started
started time in 1 week ago
Nov
19
1 week ago
Activity icon
delete

bobaekang in chicagopcdc/data-portal delete branch chore/replace-switch-with-checkbox

deleted time in 1 week ago
push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Replace with simple checkbox iput

and improve margin for form & label

bobaekang
bobaekang

Remove unused @material-ui/core from dependencies

bobaekang
bobaekang

Merge pull request #282 from chicagopcdc/chore/replace-switch-with-checkbox

Replace Material UI with in SubmitForm

commit sha: 751cba18241be9ddbb77bba9582e325169ea4191

push time in 1 week ago
pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Replace Material UI <Switch> with <input> in SubmitForm

This PR replaces Material UI <Switch> component in <SubmitForm> with native <input type="checkbox">.

This simple change results in the following benefits:

  • Shipping ~22kb less JS (minified + gzipped) to browser
  • Installing 17 less packages
  • Reducing docker image size by ~14MB

See the following images for comparison:

Before image

After image

Material UI <Switch> is not used elsewhere.

Activity icon
issue

bobaekang issue comment snowpackjs/astro

bobaekang
bobaekang

🐛 BUG: Astro.resolve() for sourcing scripts fails to get built, with and without hoist ([email protected])

What version of astro are you using?

0.21.0-next.5

What package manager are you using?

npm

What operating system are you using?

StackBlitz for the example, Windows (WSL 1) for my local use

Describe the Bug

First of all, a huge thank you to Astro maintainers for tirelessly working on improving the project. I've been creating Issues without saying much on that, so I'd like to clarify that I'm very grateful for your contributions to pushing forward the web dev with Astro.

* * *

This Issue is sort of a follow-up to #1715 and #1821.

The title pretty much says it all. Here's an example source:

---
---
<html lang="en">

<head>
	<meta charset="utf-8" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" />
	<meta name="viewport" content="width=device-width" />

	<!-- THIS DOESN'T WORK -->
	<script src={Astro.resolve('../script.js')} />
	
	<!-- THIS DOESN'T WORK EITHER -->
	<script src={Astro.resolve('../script-hoist.js')} hoist />

	<title>Welcome to Astro</title>
</head>

<body>
	<h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
</body>

</html>

And here's the build output (note the src values):

<!DOCTYPE html><html lang="en"><head>
	<meta charset="utf-8">
	<link rel="icon" type="image/x-icon" href="/favicon.ico">
	<meta name="viewport" content="width=device-width">

	<!-- THIS DOESN'T WORK -->
	<script src="/home/projects/github-4sqhr1-uhgrfh/src/script.js"></script>
	
	<!-- THIS DOESN'T WORK EITHER -->
	

	<title>Welcome to Astro</title>
<script src="/home/projects/github-4sqhr1-uhgrfh/src/script-hoist.js" hoist="true" astro-script="//script-0"></script></head>

<body>
	<h1>Welcome to <a href="https://astro.build/">Astro</a></h1>
</body></html>

The sourced scripts are not built at all as you can see in the /dist output:

image

I have also tried the same thing on my local machine and observed the same result.[^1]

[^1]: Curiously, the StackBlitz build somehow ignores public/favicon.ico, but it's probably their quirk since /dist on my machine includes favicon.ico.

In contrast, Astro.resolve() works with dev server.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-4sqhr1-uhgrfh

bobaekang
bobaekang

@FredKSchott Congratulations on v0.21 release!

Unfortunately, I can still reproduce the reported issue with [email protected]--both on StackBlitz (https://stackblitz.com/edit/github-4sqhr1-v6c7qa; it's a fork of the link above) and my local machine (WSL1-Ubuntu 20.04). I haven't changed anything other than upgrading Astro to v0.21 and got the same results.

pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Replace Material UI <Switch> with <input> in SubmitForm

This PR replaces Material UI <Switch> component in <SubmitForm> with native <input type="checkbox">.

This simple change results in the following benefits:

  • Shipping ~22kb less JS (minified + gzipped) to browser
  • Installing 17 less packages
  • Reducing docker image size by ~14MB

See the following images for comparison:

Before image

After image

Material UI <Switch> is not used elsewhere.

Activity icon
created branch

bobaekang in chicagopcdc/data-portal create branch chore/replace-switch-with-checkbox

createdAt 1 week ago
push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Remove unused acorn from dependencies

bobaekang
bobaekang

Remove unused file-loader from dependencies

bobaekang
bobaekang

Remove unused webpack-node-externals from dependencies

bobaekang
bobaekang

Remove obsolete module rule for .flow files

bobaekang
bobaekang

Remove unused ignore-loader from dependencies

commit sha: 79b3d57f3b5d8543352a52100e1371eba722384b

push time in 1 week ago
Activity icon
delete

bobaekang in chicagopcdc/data-portal delete branch chore/switch-to-react-testing-library

deleted time in 1 week ago
push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Add react testing library to devDependencies

bobaekang
bobaekang

Update src/components tests

bobaekang
bobaekang

Fix jest transform error with d3 modules

bobaekang
bobaekang
bobaekang
bobaekang

Update tests for gen3-ui-component

bobaekang
bobaekang

Update tests for UserProfile

bobaekang
bobaekang
bobaekang
bobaekang

Update tests for Submission

also extract component methods as functions to facilitate testing for

bobaekang
bobaekang

Update tests for DataModelGraph

bobaekang
bobaekang
bobaekang
bobaekang

Update tests for DataDictionary

also minor refactoring to facilitate testing for

bobaekang
bobaekang

Exclude enzyme from jest setup

bobaekang
bobaekang

Remove enzyme from devDependencies

bobaekang
bobaekang

Fix missing isNumber() & isInteger() methods

previous commit omited the refactored castOption() method

bobaekang
bobaekang

Merge pull request #281 from chicagopcdc/chore/switch-to-react-testing-library

Switch from Enzyme to React Testing Library PEDS-594

commit sha: 419016976b63ef074862594b3fc11bdbfda11742

push time in 1 week ago
pull request

bobaekang pull request chicagopcdc/data-portal

bobaekang
bobaekang

Switch from Enzyme to React Testing Library PEDS-594

Ticket: PEDS-594

This PR makes the switch from Enzyme to React Testing Library (@testing-library/react; RTL) for component testing. This is partly motivated by Enzyme's lack of support for React 17. This switch thus prepares the app for migrating to React 17 and staying up to date with the evolving ecosystem. In addition, RTL has been the de-facto standard for testing react components, encouraging best practices that were made difficult with Enzyme.

This switch involves a different approach to component testing that focuses on apparent behaviors rather than implementation details, which makes it tricky to migrate certain existing tests. While an effort was made to retain as many tests as possible (including refactoring certain components to facilitate testing), a few particularly tricky ones are simply marked with // TODO comment as a future task.

open pull request

bobaekang wants to merge chicagopcdc/data-portal

bobaekang
bobaekang

Switch from Enzyme to React Testing Library PEDS-594

Ticket: PEDS-594

This PR makes the switch from Enzyme to React Testing Library (@testing-library/react; RTL) for component testing. This is partly motivated by Enzyme's lack of support for React 17. This switch thus prepares the app for migrating to React 17 and staying up to date with the evolving ecosystem. In addition, RTL has been the de-facto standard for testing react components, encouraging best practices that were made difficult with Enzyme.

This switch involves a different approach to component testing that focuses on apparent behaviors rather than implementation details, which makes it tricky to migrate certain existing tests. While an effort was made to retain as many tests as possible (including refactoring certain components to facilitate testing), a few particularly tricky ones are simply marked with // TODO comment as a future task.

bobaekang
bobaekang

Thank you for catching this! I forgot to include the refactored castOption() method to cover for their use cases. I just pushed the change here: https://github.com/chicagopcdc/data-portal/pull/281/commits/0a2ffed801a84fd451f8cca2e7954b11411b8857.

pull request

bobaekang merge to chicagopcdc/data-portal

bobaekang
bobaekang

Switch from Enzyme to React Testing Library PEDS-594

Ticket: PEDS-594

This PR makes the switch from Enzyme to React Testing Library (@testing-library/react; RTL) for component testing. This is partly motivated by Enzyme's lack of support for React 17. This switch thus prepares the app for migrating to React 17 and staying up to date with the evolving ecosystem. In addition, RTL has been the de-facto standard for testing react components, encouraging best practices that were made difficult with Enzyme.

This switch involves a different approach to component testing that focuses on apparent behaviors rather than implementation details, which makes it tricky to migrate certain existing tests. While an effort was made to retain as many tests as possible (including refactoring certain components to facilitate testing), a few particularly tricky ones are simply marked with // TODO comment as a future task.

push

bobaekang push chicagopcdc/data-portal

bobaekang
bobaekang

Fix missing isNumber() & isInteger() methods

previous commit omited the refactored castOption() method

commit sha: 0a2ffed801a84fd451f8cca2e7954b11411b8857

push time in 1 week ago
Previous