mafia
TJC projection webapp for service use.
Desktop app powered by Electron. For personal teaching use.
Apps Script samples for G Suite products.
Use Actions on Google, Dialogflow, and Firebase to create a to-do application with a conversational UI.
Bible Verse Listener (a Node.js server that detects verse location and shows the words)
hchiam/boilerplate-mochachai 1
A boilerplate from the freeCodeCamp curriculum.
Conversational Code Creator
hchiam/chat-app-fcc-react-redux 1
Learning to build a chat app with React and Redux, using a FCC tutorial.
issue commentalan-mj-lin/Mafia
Sidebar to read top to bottom or bottom to top?
https://material-ui.com/components/snackbars/
comment created time in 17 hours
PR opened alan-mj-lin/Mafia
the centered alternative to https://github.com/alan-mj-lin/Mafia/pull/17
pr created time in 18 hours
push eventalan-mj-lin/Mafia
commit sha 97ababa5428537a779cc04f8d7a1cf5990f0addf
center the popup
push time in 18 hours
push eventalan-mj-lin/Mafia
commit sha eba59bfe5122e6fec701ed3be8c8952fdfd5fa01
make error message always show regardless of scroll (#16)
commit sha a2baa1e83cee3fdda18f2c09f6d84c1b696cc35a
fix text contrast
commit sha 60a4f561fc9c62b00eb66501ca92c3abc0bce478
make top to bottom: #16
commit sha fa608a3fed3846455df0580cd4a0c5a6162a8bf4
make error message stay longer: 5s
push time in 18 hours
issue commentalan-mj-lin/Mafia
Sidebar to read top to bottom or bottom to top?
We can make the error message display:sticky or display:fixed for now, and then at the same time maybe put the other messages in a custom component that I can style with custom CSS to do the auto scroll for you. Unless you want to research some react library or component that does what we want for the non-error messages
comment created time in 19 hours
issue closedalan-mj-lin/Mafia
smaller card size to fit more people on screen
So you don't have to scroll down to see your role. Try fixing this in pure CSS.
closed time in a day
hchiamissue closedalan-mj-lin/Mafia
Just to make it intuitive to tell which card is yours. This is a follow-up to #11 .
Try fixing this in pure CSS. Maybe even reorder your card to the top with pure CSS, give than JSX already indicates which one is your player. I made this a separate issue/ticket in case it involves a lot of JSX.
closed time in a day
hchiamissue closedalan-mj-lin/Mafia
fix sidebar messages going off-screen
The user has to think of scrolling to see the latest messages. It should just show up without extra effort on the user's part, so they can focus on other actions.
To fix this, we could:
- add messages to the top of the list instead of to the bottom, or
- auto-move all messages up (same as auto-scroll to bottom) (sounds like we're going with this one), or
- only show the last few messages.
These are technically possible with pure CSS, but it's much cleaner if we edit the JSX/HTML instead.
closed time in a day
hchiamissue closedalan-mj-lin/Mafia
@alan-mj-lin I assume you're leaving general styling to me, but here's my thoughts: Overall darker theme (instead of so much white). We could make the page darker when it's night (requires some indication of state in the HTML or JSX so I can apply styles).
closed time in a day
hchiampull request commentHouse-on-a-Rock/tjc-scheduling-web
a good amount of these file changes is purely difference in prettier formatting. kinda bloats our pull requests artificially and makes it harder to focus on necessary changes
There was an update to VS Code last month that lets you make auto-formatting on save limited to lines that you changed. We could try using that going forward.
ooo that's really interesting, but both that solution as well as the prettier solution requires users to adhere to some sort of rules anyways.
I just tried it out yesterday and it doesn't seem to work very well for me anyways.
comment created time in a day
pull request commentHouse-on-a-Rock/tjc-scheduling-web
another problem I'm having is that my sample size doesnt have enough data to test these functions as thoroughly as I'd like. for example, in this case, currently the list has 2 members. So it's difficult to see if the function is working correctly or if it's just working for 2 members. There's also a data fetching bug somewhere that's making it difficult to test them out, so these files may still need more work in the future
sounds good to me
comment created time in a day
startedhchiam/learning-semaphores
started time in a day
push eventhchiam/learning
commit sha 2cb46359df6520711c668cac4430e708e4abca9f
semaphores
push time in a day
push eventhchiam/learning-semaphores
commit sha e5d320220dabc5fbff2411eb42cbd062b9b933ea
Update README.md
push time in a day
Pull request review commentHouse-on-a-Rock/tjc-scheduling-web
export const Members = () => { email: string, password: string, ) => {- setIsAddUserDialogOpen(false); if (shouldAdd && firstName && lastName && email && password && isValidEmail(email)) { dispatch(onAddMember(firstName, lastName, email, password)); }+ setIsAddMemberDialogOpen(false); }; - const handleRowClick = (event: React.MouseEvent<unknown>, row: MemberStateData) => {+ const handleRowClick = (+ event: React.MouseEvent<unknown>,+ { userId: id }: MemberStateData,+ ) => { event.stopPropagation();- const selectedIndex = selectedRows.indexOf(row.userId);- let newSelectedRows: number[] = [];- if (event.ctrlKey) {- if (selectedIndex === -1) {- newSelectedRows = [...selectedRows, row.userId];- } else if (selectedIndex === 0) {- newSelectedRows = selectedRows.slice(1); // all but first row- } else if (selectedIndex === selectedRows.length - 1) {- newSelectedRows = selectedRows.slice(0, -1); // all but last row- } else if (selectedIndex > 0) {- newSelectedRows = [- ...selectedRows.slice(0, selectedIndex),- ...selectedRows.slice(selectedIndex + 1),- ];- }- } else {- if (selectedIndex === -1) newSelectedRows = [row.userId];- else- newSelectedRows = [- ...selectedRows.slice(0, selectedIndex),- ...selectedRows.slice(selectedIndex + 1),- ];- }- // dispatch(onLoadUser(row));- setSelectedUser(row);- setSelectedRows(newSelectedRows);+ setLastSelected(id);+ const updatedRows: number[] = event.shiftKey+ ? makeNewRows(lastSelected, id, data)+ : [id];+ selectedRows.includes(id)+ ? setSelectedRows(selectedRows.filter((rowId) => !updatedRows.includes(rowId)))+ : setSelectedRows([...selectedRows, ...updatedRows]);
I see you've made the function handleRowClick cleaner, but can you explain how this works?
comment created time in 2 days
Pull request review commentHouse-on-a-Rock/tjc-scheduling-web
+import { MemberStateData } from '../../../store/types';++export function makeNewRows(start: number, end: number, data: MemberStateData[]) {+ let newRows: number[] = [];+ let startPushing: boolean = false;+ const vectoredData: MemberStateData[] = start < end ? data : data.reverse();++ for (let i = 0; i < vectoredData.length; i++) {+ if (startPushing) {+ newRows.push(vectoredData[i].userId);+ if (vectoredData[i].userId === end) break;+ }+ if (vectoredData[i].userId === start) startPushing = true;+ }
Do we want to exclude the start row? How about this?
for (let i = 0; i < vectoredData.length; i++) {
if (vectoredData[i].userId === start) startPushing = true; // so start index is included?
if (startPushing) {
newRows.push(vectoredData[i].userId);
if (vectoredData[i].userId === end) break;
}
}
comment created time in 2 days
Pull request review commentHouse-on-a-Rock/tjc-scheduling-web
export const Members = () => { email: string, password: string, ) => {- setIsAddUserDialogOpen(false); if (shouldAdd && firstName && lastName && email && password && isValidEmail(email)) { dispatch(onAddMember(firstName, lastName, email, password)); }+ setIsAddMemberDialogOpen(false); }; - const handleRowClick = (event: React.MouseEvent<unknown>, row: MemberStateData) => {+ const handleRowClick = (+ event: React.MouseEvent<unknown>,+ { userId: id }: MemberStateData,+ ) => { event.stopPropagation();- const selectedIndex = selectedRows.indexOf(row.userId);- let newSelectedRows: number[] = [];- if (event.ctrlKey) {- if (selectedIndex === -1) {- newSelectedRows = [...selectedRows, row.userId];- } else if (selectedIndex === 0) {- newSelectedRows = selectedRows.slice(1); // all but first row- } else if (selectedIndex === selectedRows.length - 1) {- newSelectedRows = selectedRows.slice(0, -1); // all but last row- } else if (selectedIndex > 0) {- newSelectedRows = [- ...selectedRows.slice(0, selectedIndex),- ...selectedRows.slice(selectedIndex + 1),- ];- }- } else {- if (selectedIndex === -1) newSelectedRows = [row.userId];- else- newSelectedRows = [- ...selectedRows.slice(0, selectedIndex),- ...selectedRows.slice(selectedIndex + 1),- ];- }- // dispatch(onLoadUser(row));- setSelectedUser(row);- setSelectedRows(newSelectedRows);+ setLastSelected(id);+ const updatedRows: number[] = event.shiftKey+ ? makeNewRows(lastSelected, id, data)
Won't lastSelected and id be the same after setLastSelected(id)? Would it make sense to put it after?
const updatedRows: number[] = event.shiftKey
? makeNewRows(lastSelected, id, data)
: [id];
setLastSelected(id); // set this after?
comment created time in 2 days
Pull request review commentHouse-on-a-Rock/tjc-scheduling-web
+import { MemberStateData } from '../../../store/types';++export function makeNewRows(start: number, end: number, data: MemberStateData[]) {
This took me a while to understand. Is this helper function used to update an array of selected row IDs? How about we rename it to makeNewSelectedRows or getUpdatedRowSelection or updateRows or updateSelectedRows?
export function updateSelectedRows(start: number, end: number, data: MemberStateData[]) {
comment created time in 2 days
pull request commentHouse-on-a-Rock/tjc-scheduling-web
a good amount of these file changes is purely difference in prettier formatting. kinda bloats our pull requests artificially and makes it harder to focus on necessary changes
There was an update to VS Code last month that lets you limit formatting to changed code
comment created time in 2 days
startedAllenDowney/LittleBookOfSemaphores
started time in 4 days
startedAllenDowney/ThinkBayes
started time in 4 days
startedRich-Harris/degit
started time in 5 days
startedhchiam/hchiam
started time in 5 days
push eventhchiam/hchiam
commit sha 7d1aa58050223277f1e930392b218d8fc57fd517
add @hchiam/deps
push time in 5 days
push eventhchiam/learning-js
commit sha de944ecad177bd5ffa5faefaaa33bd0833237e96
add another example
push time in 8 days
push eventhchiam/learning-js
commit sha 167f605db6f74b9a630cc9a9e3654fc28ca5b3ae
correction
push time in 8 days
push eventhchiam/learning-js
commit sha a1438460ee18753662fdf38338ff2dc4686fe6a2
Create queue-stack-push-pop-shift-unshift.js
push time in 8 days
push eventhchiam/learning-js
commit sha 166bd9dd972839d282246ce6f879ad79f45319f4
Update array-fill.js
push time in 8 days
push eventhchiam/learning-js
commit sha d4e8ba2716fa516beaa49c31b78d279c3ff388f4
Create array-fill.js
push time in 8 days
push eventhchiam/learning-graphql
commit sha 6267e710150719c2a423db5eb324dbd105601d3b
link to example usage with React and Apollo
push time in 9 days
push eventhchiam/learning-firestore
commit sha b6393972947ca4693d4b25d85b6207abe0e96713
tutorial link
push time in 9 days
PR opened phuoc-ng/this-vs-that
Just fixing a minor typo. This is a great resource!
pr created time in 9 days
push eventhchiam/this-vs-that
commit sha 8a5bb5ffa7da5d395a5062a6b12434686a410d8f
addEventListner -> addEventListener
push time in 9 days
push eventhchiam/learning-tailwind-css
commit sha 4af5d89a06ec8ee0fd3fbedc7001a25f6b6a3662
add quora explanation
push time in 9 days
fork hchiam/this-vs-that
What is the difference between ___ and ___ in the front-end development?
fork in 9 days
startedphuoc-ng/this-vs-that
started time in 9 days
push eventhchiam/learning-firestore
commit sha 3cb94612dccfe1465f4ae0a24d56842d3c2bff1d
rephrase slightly shorter
push time in 9 days
push eventhchiam/learning-firestore
commit sha 9691dec33b70e2c7da5f0890f924695648ac87c6
add link to repo with Vue + Firebase
push time in 9 days
push eventhchiam/web-accessibility-course-notes
commit sha f147b6451ee2726fbb4eea03e6d17b8a1cbc5746
draw without a touchpad/stylus
push time in 9 days
push eventhchiam/web-accessibility-course-notes
commit sha 3bbf04358c98df9318bf8d5dd121d263df9986e9
what to say instead of "click here"
push time in 9 days
startedhchiam/learning-firestore
started time in 9 days
push eventhchiam/learning
commit sha 9796c5499798c6a173755d33fd0611dba56ca520
Firestore
push time in 9 days
push eventhchiam/learning-reactjs
commit sha 93583d0e1a1cafa9101e2544140014fd9fd3c3ef
link to firestore repo
commit sha 2b1e7b280128d6f8985e79255d3459412bfbf9e6
add more notes on hooks
push time in 9 days
push eventhchiam/learning-react-apollo
commit sha 910e96ee02cf0064b704d9ba4ad1670627af9f04
link back to react repo
push time in 9 days
push eventhchiam/learning-js
commit sha 45f467fba0964b2147054207a6d435986752a2b4
add catch to promise, add note, autoformat
push time in 9 days
push eventhchiam/draw-with-mouse-and-spacebar
commit sha a6145640406be107ca07a94f65df8015f110a18f
list out other key options
push time in 11 days
push eventhchiam/draw-with-mouse-and-spacebar
commit sha d260a333f680e2da2a3bbf4a8c1406ddfeaafa89
surge.sh demo
push time in 11 days
push eventhchiam/draw-with-mouse-and-spacebar
commit sha 56ff83f9e6db02530edd747814ba49eaff4f572d
yarn sass beforehand
commit sha 461b89c3f8ae033bbde91b257a9a50b81cf3828c
link to learning-yarn
push time in 11 days
push eventhchiam/draw-with-mouse-and-spacebar
commit sha 6b8c98c1f30d5ffcb9313768649681ef7abc49b6
demo script
push time in 11 days
push eventhchiam/draw-with-mouse-and-spacebar
commit sha 461c3f0ea74b892fa073ebf914ccf414c0fc4a4d
https://stackoverflow.com/questions/3902635/how-does-one-capture-a-macs-command-key-via-javascript/3922353#3922353
push time in 11 days
push eventhchiam/learning
commit sha b0b0c28ce3c378ec7b0e19dba0707ac7fb1a2b5a
AVIF
push time in 11 days
startedhchiam/learning-avif
started time in 11 days
push eventhchiam/learning-avif
commit sha 318bda17ceeb1b779e9f670f7793f57efd4399e3
link to my main learning repo
push time in 11 days
push eventhchiam/learning-gh
commit sha 7770da369d55e8832ca16bd4367b9fa51e999e5f
words before 3rd link so it doesn't look like link wraparound
push time in 11 days
push eventhchiam/learning-gh
commit sha 0805e2688b546dbddf7e05593f878347824c5bde
Example workflow all using `gh`
push time in 11 days
push eventhchiam/learning-avif
commit sha 5d27c5959b79da947ed1011f7c7e254273864fef
one-sentence summary
push time in 11 days
push eventhchiam/learning-js
commit sha 1179585ddc5e98886876eb695bfbcac218cb9638
Chrome dev tools tricks for more productive debugging
push time in 11 days
push eventhchiam/learning-js
commit sha 2b1ea6a73ee996f05772e276c8f90296fede556e
Create console-time.js
push time in 11 days
push eventhchiam/learning-js
commit sha b3ee14823737cc63aa515499f6251a308910a271
Create console-group.js
push time in 11 days
push eventhchiam/learning-js
commit sha 71a307dfa069d31de0dba288d159fac1afd541de
Create console-styled.js
push time in 11 days
push eventhchiam/learning-powershell
commit sha dc781f01366541ceec6ffc0fb34ccfcf8037d1e0
add beep command
push time in 12 days
push eventhchiam/sourcefetch-server
commit sha 9ae311c72e6930413fa537c70cb08ba85770a115
also call wakeUpServer() at 0s
push time in 13 days
push eventhchiam/sourcefetch-server
commit sha d6bfb9c12437c262b998560980964b73d825451a
make demo keep glitch server awake
push time in 13 days
push eventhchiam/_2DNote
commit sha 98d600509d21653b89234614bc01dcc170bfdad6
1.9.1
push time in 14 days
created taghchiam/_2DNote
Potential: power 2D apps that people can use together, regardless of vision capabilities? https://codepen.io/hchiam/full/eYYdVeX
created time in 14 days
push eventhchiam/_2DNote
commit sha 8f7f86e7814d01f5c9cc408287d816eb5c7de7e8
inline badges
push time in 14 days
push eventhchiam/_2DNote
commit sha fca643f7a6ced3237221ed29b41795848ce00500
correct link in npm badges
push time in 14 days
push eventhchiam/learning-js
commit sha 9da790de16cfc6905148c4e824ce4b83b092d97c
correct distinct
push time in 15 days
push eventhchiam/learning
commit sha aa9840c7767e1404e3b079d93ad6b2c38f6e323b
React + Apollo + GraphQL
push time in 15 days
startedhchiam/learning-react-apollo
started time in 15 days
push eventhchiam/learning-yarn
commit sha 8e36306516cc009ea904003f5bf2985296881995
auto-formatting
commit sha 7bbd672c649c7c3d358ea591cc3a691111abba8c
add init command
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 1e070214b29401d4af48e6ef8287d0a03da3d289
ran yarn init and yarn command
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha a7b40b33b6047fd4e5798fb2faddf57784ccb327
typo
commit sha 5f9a8c86d85b96f32b79491a4315ce96e14bf394
learning-yarn repo link
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 88347c09255acb1c260230673f34c06bbba59659
remove collapsible heading formatting symbols
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 025fefe6c849f93c70aca79a34bfd1dadb7f5fce
add more client functions
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha a253798a5d038b69773050b0f78efa8c04e398dc
ways to refetch queries
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 74423f0c19b0db3dfb1b5489fa0924d6f4b903be
notes on the ways to override Apollo cache
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 333eae682a88126643b1aad29abe77ff4fb7c4ed
add example code
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 02ce3d1bfc4e49056df53986fd36c8b50a95650c
add link to GraphQL learning repo
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha d898f4e4d2ae236887f1d85a83acf8bb9ebb0720
add Apollo setup + adjust heading levels
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha 212a1b2e945c9f373e748482218750911dfc8270
FE = frontend; BE = backend
push time in 16 days
push eventhchiam/learning-react-apollo
commit sha f6f0b8d6954405b973491eea49942e1b9a8d2660
quick summary notes
push time in 16 days
push eventhchiam/learning-reactjs
commit sha 21485cf26071eb2b420c63981ff212706a6c4c7d
link to new learning repo
push time in 16 days
push eventhchiam/learning-cucumber
commit sha 5d1618b436949e78abd95369801482c550c090c5
Bump yargs-parser from 13.1.1 to 13.1.2 Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2. - [Release notes](https://github.com/yargs/yargs-parser/releases) - [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md) - [Commits](https://github.com/yargs/yargs-parser/commits) Signed-off-by: dependabot[bot] <[email protected]>
commit sha 72a849aada48e66c49cc07d9c9e7498d6612e491
Merge pull request #3 from hchiam/dependabot/npm_and_yarn/yargs-parser-13.1.2 Bump yargs-parser from 13.1.1 to 13.1.2
push time in 16 days