-
Notifications
You must be signed in to change notification settings - Fork 568
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
WIP: Types/type note list #1807
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmsnell
added a commit
that referenced
this pull request
Jan 4, 2020
In the existing code we're recomputing the current list item in the note list when we've already assigned it above. In this patch we're using the already-assigned value. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 4, 2020
Previously we have been (successfully) passing string values of `0` into the `tabIndex` property on parts of the note list preview. While acceptible this is the wrong datatype. In this patch we're passing the `{0}` value instead through React so that the types unify. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 4, 2020
Keeping up with React standards. This patch replaces the use of a ref function with a `createRef()`. This will end up making our types easier. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 4, 2020
When adding tag-suggestions in the note list we create a "composite list" of notes and placeholders. The placeholders designate where headers will go, where the tag suggestions list will go, and where a message will go if there are no matching notes. There were two issues with this structure: - it was difficult to type because of how its structure overlapped a `NoteEntity` but didn't have a key field for discriminating the type. everything works just fine but the type signatures become harder to write. - we were storing display information in the `data` property and that, as a render concern, wasn't necessary Further, we were directly mutating `notes` which came from `filterNotes()` and the Redux state. We want to avoid directly mutating values we receive from other places in order to keep data flows clear and obvious. In this patch we are replacing the object data type for placeholders with simpler string counterparts, moving the label text into the `render` function, and exchanging a mutating operation for a non-mutating one. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
In the existing code we're recomputing the current list item in the note list when we've already assigned it above. In this patch we're using the already-assigned value. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
Previously we have been (successfully) passing string values of `0` into the `tabIndex` property on parts of the note list preview. While acceptible this is the wrong datatype. In this patch we're passing the `{0}` value instead through React so that the types unify. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
Previously we have been (successfully) passing string values of `0` into the `tabIndex` property on parts of the note list preview. While acceptible this is the wrong datatype. In this patch we're passing the `{0}` value instead through React so that the types unify. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
When adding tag-suggestions in the note list we create a "composite list" of notes and placeholders. The placeholders designate where headers will go, where the tag suggestions list will go, and where a message will go if there are no matching notes. There were two issues with this structure: - it was difficult to type because of how its structure overlapped a `NoteEntity` but didn't have a key field for discriminating the type. everything works just fine but the type signatures become harder to write. - we were storing display information in the `data` property and that, as a render concern, wasn't necessary Further, we were directly mutating `notes` which came from `filterNotes()` and the Redux state. We want to avoid directly mutating values we receive from other places in order to keep data flows clear and obvious. In this patch we are replacing the object data type for placeholders with simpler string counterparts, moving the label text into the `render` function, and exchanging a mutating operation for a non-mutating one. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
When adding tag-suggestions in the note list we create a "composite list" of notes and placeholders. The placeholders designate where headers will go, where the tag suggestions list will go, and where a message will go if there are no matching notes. There were two issues with this structure: - it was difficult to type because of how its structure overlapped a `NoteEntity` but didn't have a key field for discriminating the type. everything works just fine but the type signatures become harder to write. - we were storing display information in the `data` property and that, as a render concern, wasn't necessary Further, we were directly mutating `notes` which came from `filterNotes()` and the Redux state. We want to avoid directly mutating values we receive from other places in order to keep data flows clear and obvious. In this patch we are replacing the object data type for placeholders with simpler string counterparts, moving the label text into the `render` function, and exchanging a mutating operation for a non-mutating one. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 6, 2020
Keeping up with React standards. This patch replaces the use of a ref function with a `createRef()`. This will end up making our types easier. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 7, 2020
Keeping up with React standards. This patch replaces the use of a ref function with a `createRef()`. This will end up making our types easier. This is part of broader work to separate modifying the search parameters from actually filtering the notes and was originally created as part of an exploratory PR #1807.
dmsnell
added a commit
that referenced
this pull request
Jan 10, 2020
…utualized Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`.
4c34883
to
86b89ac
Compare
dmsnell
added a commit
that referenced
this pull request
Jan 15, 2020
…utualized Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`.
dmsnell
added a commit
that referenced
this pull request
Jan 17, 2020
…utualized Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`.
dmsnell
added a commit
that referenced
this pull request
Apr 14, 2020
…tualized Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`.
codebykat
pushed a commit
that referenced
this pull request
Apr 16, 2020
…tualized Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`.
dmsnell
added a commit
that referenced
this pull request
Apr 17, 2020
…tualized (#1829) Follows exploratory work in #1807 For a long time we have had our own custom note list height cache. This was used to tell `react-virtualized` how tall each item in the list is so that it can determine how many and which ones to render. That cache was complicated and sensitive due to the caching and performance-oriented nature of the code. Whether `CellMesurerCache` existed when we first put in `react-virtualized` I don't know but it does do what we want it to do and with less guessing. It keeps track of the heights for the rendered components and provides a clean API to interface with the `AutoSizer`. In this patch we're removing our custom height cache and instead relying on the one provided by `react-virtualized`. * special case the No Notes section so it retains its height Co-authored-by: Kat Hagan <kat@codebykat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch is a little wiry: I'm going to split it into a million little PRs.
Please ignore.