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

Circulars Archive Group View #2617

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

Courey
Copy link
Contributor

@Courey Courey commented Oct 10, 2024

This work is based off #2538 and will be turned into a non-draft PR once that work has been merged in and I rebase off main.

Description

This work includes:

  • a button to toggle from the index view to the group view
  • a drop down list of the circular titles when viewed from the circulars archive
  • a link to each circular group in the circulars archive group view
  • a route for a synonym group overview
  • full circular data in a drop down on the group overview page with a link to each individual circular
  • a feature flag hiding the synonyms work

Related Issue(s)

Resolves #2544

Testing

This has been thoroughly manually tested locally, but should be tested on dev WITHOUT the feature flag on to ensure that no existing functionality has broken.

Images

Screenshot 2024-10-10 at 3 26 08 PM Screenshot 2024-10-10 at 3 26 19 PM Screenshot 2024-10-10 at 3 26 34 PM Screenshot 2024-10-10 at 3 26 44 PM

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 6.30631% with 104 lines in your changes missing coverage. Please review.

Project coverage is 6.18%. Comparing base (49d38a5) to head (0458fd8).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
app/routes/circulars._archive._index/route.tsx 0.00% 34 Missing ⚠️
app/routes/group.$synonymId.tsx 0.00% 28 Missing ⚠️
app/routes/synonyms/synonyms.server.ts 29.16% 17 Missing ⚠️
app/routes/group/route.tsx 0.00% 9 Missing ⚠️
...es/circulars._archive._index/SynonymGroupIndex.tsx 0.00% 7 Missing ⚠️
app/components/pagination/Pagination.tsx 0.00% 2 Missing ⚠️
.../routes/circulars.$circularId.($version)/route.tsx 0.00% 2 Missing ⚠️
...es/circulars.edit.$circularId/CircularEditForm.tsx 0.00% 2 Missing ⚠️
app/components/circularDisplay/FrontMatter.tsx 0.00% 1 Missing ⚠️
...es/circulars.edit.$circularId/RichEditor/index.tsx 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #2617      +/-   ##
========================================
- Coverage   6.23%   6.18%   -0.05%     
========================================
  Files        167     170       +3     
  Lines       4219    4298      +79     
  Branches     465     479      +14     
========================================
+ Hits         263     266       +3     
- Misses      3954    4030      +76     
  Partials       2       2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

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

Please rebase.

@Courey Courey force-pushed the courey/grouping branch 2 times, most recently from e64cd81 to d91fa13 Compare October 16, 2024 15:00
@Courey Courey marked this pull request as ready for review October 16, 2024 15:46
@Courey Courey requested a review from lpsinger October 16, 2024 15:46
@Courey
Copy link
Contributor Author

Courey commented Oct 16, 2024

Added "Open/Close All" button on group overview page as requested by @jracusin
Screenshot 2024-10-16 at 11 47 38 AM
Screenshot 2024-10-16 at 11 47 32 AM

@Courey
Copy link
Contributor Author

Courey commented Oct 16, 2024

Please rebase.

That was the plan as I said in the original PR description:

This work is based off #2538 and will be turned into a non-draft PR once that work has been merged in and I rebase off main.

I rebased and took the PR out of draft status.

@Courey Courey requested a review from dakota002 October 16, 2024 15:54
Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

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

There are more conflicts. Please rebase again.

adds validation and error handling

fixes tests

adds modal warning prior to delete

changes removal button to words instead of only icons

code review change requests

removing unused className

formatting

autofill moderator synonym eventId selector

adding create sad path test

removing feature flag check

adding a 3 second debounce

Adds grouped view to circulars archive index

adds missing route and flag checks
Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

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

First, some high-level UX feedback:

  • Please use numbered lists, not bulleted lists, for Circulars in the index view. The list number value should be the Circular number.
  • For now, don't have disclosure arrows on the per-group page. Just display all of the Circulars belonging to the group. We can fine-tune the UI to quickly navigate within a group in a future PR.

@Courey
Copy link
Contributor Author

Courey commented Oct 22, 2024

Removed details element from group overview:
Screenshot 2024-10-22 at 09-36-40 GCN - Circulars

Made ul an ol with circularId values:
Screenshot 2024-10-22 at 9 36 13 AM

@Courey Courey requested a review from lpsinger October 22, 2024 13:44
@@ -29,6 +29,7 @@ export const AstroDataContext = createContext<AstroDataContextProps>({})
/**
* An Astro Flavored Markdown enriched link.
*/
// eslint-disable-next-line react/display-name
Copy link
Member

Choose a reason for hiding this comment

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

Why was this addition necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when I moved the component into the components directory, it is judged as a component definition and causes this warning:
Screenshot 2024-10-22 at 1 58 18 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to make the move have no changes to the code if possible

app/components/pagination/PaginationSelectionFooter.tsx Outdated Show resolved Hide resolved
@@ -53,6 +64,7 @@ export default function PaginationSelectionFooter({
page={page}
limit={limit}
totalPages={totalPages}
view={view}
Copy link
Member

Choose a reason for hiding this comment

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

Why does the Pagination component need to know about the view?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because in getPageLink if the view is not set as a search param, then when it creates the link, it doesn't include view. If it doesn't include view, then the view defaults to index. If it's always index, then the pagination links will never work for groups. To show you what I mean, here is what happens when I remove the view from getPageLinks. When I hover over the 2 button, this is the link. You will see that it doesn't include the view so when that page is navigated to, it's the index view which is the default.
pagination_view

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see.

The last time that I looked at this component, I noticed that a lot of apparently separate concerns were leaking into it from pages that use it. At some point, I'd like to come back to this and try to refactor it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's a good idea. It did feel odd to have to add view specific code to it.

app/routes/synonyms.$synonymId.tsx Outdated Show resolved Hide resolved
@Courey Courey requested a review from lpsinger October 22, 2024 18:03
@lpsinger
Copy link
Member

Removed details element from group overview: Screenshot 2024-10-22 at 09-36-40 GCN - Circulars

Made ul an ol with circularId values: Screenshot 2024-10-22 at 9 36 13 AM

Instead of the boxes, could we just put a horizontal rule between Circulars for now?

app/routes/group.$synonymId.tsx Outdated Show resolved Hide resolved
app/routes/group.$synonymId.tsx Outdated Show resolved Hide resolved
app/routes/group.$synonymId.tsx Outdated Show resolved Hide resolved
app/routes/group.$synonymId.tsx Outdated Show resolved Hide resolved
app/routes/group/route.tsx Outdated Show resolved Hide resolved
app/routes/synonyms/synonyms.server.ts Outdated Show resolved Hide resolved
@Courey Courey requested a review from lpsinger October 24, 2024 15:49
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.

Circulars Grouped by Synonyms index
2 participants