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

fix(district): Attaches pacer_case_id to entry links #398

Closed

Conversation

ERosendo
Copy link
Contributor

@ERosendo ERosendo commented Sep 18, 2024

This PR introduces logic to attach the pacer_case_id as a query parameter to entry links. This updates ensures the case ID is easily accessible from the URL even if it's not present in the subsequent page's DOM. This will simplify the process of navigating between pages while retaining important case information.

This PR partially fixes freelawproject/recap#369. Users accessing attachment pages from CourtListener or the docket report will no longer encounter problems. However, the extension's ability to capture attachment pages remains limited when users employ links from sources outside these two.

@mlissner If the extension is unable to gather all the necessary data for a page upload, should we display a warning message to alert users of the potential issue and guide them towards a successful upload?

Adds the `pacer_case_id` as a query parameter to entry links, allowing it to be easily accessible from the URL even if it's not present in the subsequent page's DOM. This will simplify the process of navigating between pages while retaining important case information.
@ERosendo ERosendo force-pushed the 369-feat-capture-attachment-pages-with-no-footer-form branch from 58e281d to d275956 Compare September 18, 2024 22:09
@ERosendo ERosendo marked this pull request as ready for review September 18, 2024 22:11
@mlissner
Copy link
Member

mlissner commented Sep 18, 2024

Hm, I think adding things to the URL should be the last resort since such parameters can get sent to the server and since they impact the page itself (via things like replaceNode, for example).

Looking at the attachment page in the issue:

https://ecf.cacd.uscourts.gov/doc1/031038943352?caseid=868080

The HTML seems to have the case ID in the goDLS thing:

<a href="https://ecf.cacd.uscourts.gov/doc1/031138943352" 
   onclick="goDLS('/doc1/031138943352','868080','9','','','','','','');return(false);">1</a>

Why not parse it from there? We've got utilities for that, right?

@ERosendo
Copy link
Contributor Author

Why not parse it from there? We've got utilities for that, right?

When attempting to parse the goDLS function using the existing method, I encountered an issue. The current implementation relies on a regular expression designed to extract eight parameters. However, this version of goDLS uses nine parameters.

I'll update the helper method and adjust the overall approach of this PR to retrieve the pacer_doc_id from the goDLS function.

Thanks for your comment.

@mlissner
Copy link
Member

Interesting. Now we can try to figure out what that ninth one is!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Extension failing to capture attachment pages with no form at the bottom
2 participants