Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Birth of parseBool() #455

Merged
merged 26 commits into from
Aug 29, 2022
Merged

Birth of parseBool() #455

merged 26 commits into from
Aug 29, 2022

Conversation

mle225
Copy link
Collaborator

@mle225 mle225 commented Apr 28, 2022

  • Created src/lib/common/utils.ts for general purpose utility functions
  • Moved isStringTruthy there
  • Modified DEBUG constant to use the new isStringTruthy function
  • Modified acmEvent interface to include isPinned : boolean attribute

@mle225 mle225 self-assigned this Apr 28, 2022
@vercel
Copy link

vercel bot commented Apr 28, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
acm-csuf-site ✅ Ready (Inspect) Visit Preview Aug 29, 2022 at 7:51AM (UTC)

Copy link
Owner

@EthanThatOneKid EthanThatOneKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for publishing your progress on #422! I left a few comments with my suggestions for techniques writing the isStringTruthy utility function 😎

Reminder: Once your PR is no longer a WIP, update its name to accurately reflect the changes you will have made.

src/lib/common/utils.ts Outdated Show resolved Hide resolved
src/lib/common/utils.ts Outdated Show resolved Hide resolved
src/lib/common/utils.ts Outdated Show resolved Hide resolved
@jaasonw jaasonw linked an issue Apr 29, 2022 that may be closed by this pull request
@vercel vercel bot temporarily deployed to Preview April 29, 2022 19:51 Inactive
@vercel vercel bot temporarily deployed to Preview April 29, 2022 19:54 Inactive
Co-authored-by: Ethan Davidson <[email protected]>
@vercel vercel bot temporarily deployed to Preview April 29, 2022 20:08 Inactive
@vercel vercel bot temporarily deployed to Preview April 29, 2022 21:45 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 07:58 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 08:11 Inactive
- Generated 10 events from the existing `events.ics` testdata file.
- Created a test that verifies that the ICAL parser parses the code deterministically as expected.
@vercel vercel bot temporarily deployed to Preview May 19, 2022 09:09 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 09:27 Inactive
@vercel vercel bot temporarily deployed to Preview May 19, 2022 10:55 Inactive
@EthanThatOneKid EthanThatOneKid changed the title Birth of determineTruthyString() Birth of parseBool() May 19, 2022
@vercel vercel bot temporarily deployed to Preview May 20, 2022 22:56 Inactive
@vercel vercel bot temporarily deployed to Preview May 20, 2022 23:47 Inactive
@vercel vercel bot temporarily deployed to Preview May 21, 2022 00:30 Inactive
@vercel vercel bot temporarily deployed to Preview May 21, 2022 02:48 Inactive
src/lib/common/utils.ts Outdated Show resolved Hide resolved
src/lib/common/utils.ts Outdated Show resolved Hide resolved
@EthanThatOneKid EthanThatOneKid self-assigned this Aug 25, 2022
@vercel vercel bot temporarily deployed to Preview August 29, 2022 05:12 Inactive
@vercel vercel bot temporarily deployed to Preview August 29, 2022 07:34 Inactive
@vercel vercel bot temporarily deployed to Preview August 29, 2022 07:51 Inactive
@EthanThatOneKid EthanThatOneKid merged commit a45ee87 into main Aug 29, 2022
jaasonw pushed a commit to jaasonw/acmcsuf.com that referenced this pull request Aug 29, 2022
* added common util folder, implemented isStringTruthy, added isPinned to acmEvent

* cast DEBUG to string to check

* Update isStringTruthy function signature

Co-authored-by: Ethan Davidson <[email protected]>

* Update isStringTruthy truthy check

Co-authored-by: Ethan Davidson <[email protected]>

* Update src/lib/common/utils.ts

Co-authored-by: Ethan Davidson <[email protected]>

* modified isStringTruthy and added test cases

* Refactored truthiness checker function

- Renamed to `determineTruthyString`

* Updated tests for `determineTruthyString`

* Updated import for `determineTruthyString`

* Attempt number 1 at _Recent Events_ UI

* Added ICAL parser integration testing

- Generated 10 events from the existing `events.ics` testdata file.
- Created a test that verifies that the ICAL parser parses the code deterministically as expected.

* Show sample events if in debug mode and no events currently exist

* Progress

* Updated sample event data

* This commit should fail the tests, but it won't

* Resolved <EthanThatOneKid#455 (comment)> and <EthanThatOneKid#455 (comment)>

* Revert "Attempt number 1 at _Recent Events_ UI"

This reverts commit af8c952.

* Renamed `determineTruthyString` to `parseBool`

* Revert "This commit should fail the tests, but it won't"

This reverts commit f6f85d1.

* Included a case for "any non-falsy string" since any string passed to parseBool that isn't falsy should return true.

Resolves <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r879979282>.

* Refactored parseBool function

Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605080>.

Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605142>.

* This is true progress.

Co-authored-by: Ethan Davidson <[email protected]>
jaasonw pushed a commit to jaasonw/acmcsuf.com that referenced this pull request Aug 29, 2022
* added common util folder, implemented isStringTruthy, added isPinned to acmEvent

* cast DEBUG to string to check

* Update isStringTruthy function signature

Co-authored-by: Ethan Davidson <[email protected]>

* Update isStringTruthy truthy check

Co-authored-by: Ethan Davidson <[email protected]>

* Update src/lib/common/utils.ts

Co-authored-by: Ethan Davidson <[email protected]>

* modified isStringTruthy and added test cases

* Refactored truthiness checker function

- Renamed to `determineTruthyString`

* Updated tests for `determineTruthyString`

* Updated import for `determineTruthyString`

* Attempt number 1 at _Recent Events_ UI

* Added ICAL parser integration testing

- Generated 10 events from the existing `events.ics` testdata file.
- Created a test that verifies that the ICAL parser parses the code deterministically as expected.

* Show sample events if in debug mode and no events currently exist

* Progress

* Updated sample event data

* This commit should fail the tests, but it won't

* Resolved <EthanThatOneKid#455 (comment)> and <EthanThatOneKid#455 (comment)>

* Revert "Attempt number 1 at _Recent Events_ UI"

This reverts commit af8c952.

* Renamed `determineTruthyString` to `parseBool`

* Revert "This commit should fail the tests, but it won't"

This reverts commit f6f85d1.

* Included a case for "any non-falsy string" since any string passed to parseBool that isn't falsy should return true.

Resolves <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r879979282>.

* Refactored parseBool function

Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605080>.

Resolved <https://github.com/EthanThatOneKid/acmcsuf.com/pull/455/files#r878605142>.

* This is true progress.

Co-authored-by: Ethan Davidson <[email protected]>
@jaasonw jaasonw deleted the fix/422 branch September 7, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Utility function for finding truthiness of a string
3 participants