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

Feature/allow annotation interactions while loading #56

Merged
merged 4 commits into from
Feb 26, 2024

Conversation

aswallace
Copy link
Contributor

@aswallace aswallace commented Feb 8, 2024

Description

This allows users to continue to interact with annotations in the 'Available Annotations' list while they are loading.

  • Removed disabled styling for loading items
  • Separated the 'no files found' message and its styles from the FileList component so that it can be re-used for the DirectoryTree
    • Message displays pretty-printed info about filters/annotations applied
  • Added a short description of how to run tests in the dev-docs
  • Realized I didn't port over the :( so removed it from the unit test, can definitely add it back in

Testing

Tested manually on local build, on site and off site (with VPN)

closes #51

@aswallace aswallace linked an issue Feb 8, 2024 that may be closed by this pull request
@@ -84,6 +85,9 @@ export default function DirectoryTree(props: FileListProps) {
aria-multiselectable="true"
id={Tutorial.FILE_LIST_ID}
>
{!error && (!content || (Array.isArray(content) && !content.length)) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be useful to pretty print the filters applied in the empty file message. It would duplicate the UI components that display the filters themselves, but may be useful to those unfamiliar with the app. What do you think? We could get this information from the fileSet variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense. So something like "No files found with {list of comma-separated human readable filters}" or "Filters applied: {ul of filters}"

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think that would be perfect, probably including the hierarchy too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in most recent commit

@aswallace aswallace self-assigned this Feb 14, 2024
import AnnotationFilter from "../AnnotationSidebar/AnnotationFilter";

import styles from "./FilterMedallion.module.css";

export interface Filter {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this interface out into ../entity/FileFilter since it gets used a couple times

@aswallace aswallace requested a review from SeanLeRoy February 21, 2024 23:35
The unit tests for each of the packages can also be run independently, using `npm run test:core`, `npm run test:desktop`,
or `npm run test:web`, respectively.

To run the linter, use `npm run lint`, and for typechecking, use `npm run typeCheck`.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

text-decoration: none;
}

.filter:not(:last-child):after {
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh neat pattern!

}).filter((filter) => filter.displayValue !== undefined);
return groupBy(filters, (filter) => filter.name);
}
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the createSelector solution! The only useMemo approach that I have thought of for this would be either to move the useMemo call up in the component hierarchy to a common ancestor of all the places you want to use it. This seems preferable.

@aswallace aswallace merged commit 55ab3c0 into master Feb 26, 2024
3 checks passed
@aswallace aswallace deleted the feature/allow-annotation-interactions-while-loading branch February 26, 2024 19:02
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.

Allow annotations to be interacted with while loading
3 participants