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

Understand the Context - "Press Statements" tab pagination and scroll #485

Open
cybkong opened this issue Jul 7, 2021 · 6 comments
Open

Comments

@cybkong
Copy link
Collaborator

cybkong commented Jul 7, 2021

Understand the Context section- pagination and scroll for "Press Statements" tab needs to be corrected
Story 79
https://billmap.govtrack.us/bills/117hr1

Screen Shot 2021-07-07 at 3 37 02 PM

@cybkong cybkong changed the title Understand the Context - "Press Statements" tab pagination Understand the Context - "Press Statements" tab pagination and scroll Jul 7, 2021
@aih
Copy link
Collaborator

aih commented Jul 7, 2021

@cybkong, thank you for this issue. For future issues, please make sure to provide enough context to reproduce the issue. This usually includes:

  1. A sample url
  2. A screenshot including the url, if possible
  3. A copy of the full Story description, if there is one. That helps document the issue as we're working on it. If the story changes, copy those changes to a comment in the issue.

For items 1,2 above, for example:
https://billmap.govtrack.us/bills/117hr1
image

@leedavidr
Copy link
Collaborator

Ok I think 116hr1 has 46 pages for press statements

I think pagination is being done manually in the HTML, and datatables supports pagination in the other tables
@ayeshamk was there a reason we're using manual pagination here or can I switch it out?

@aih @ayeshamk Also, locally, I can't seem to access 116hr1, etc. Do I have to run the bill jobs again to make sure? I ran it recently but maybe it failed for those? I have some odd behaviors on local that I need to look at soon.

Screen Shot 2021-07-07 at 3 29 54 PM

Screen Shot 2021-07-07 at 3 32 16 PM

@leedavidr
Copy link
Collaborator

I think we just have to remove the commented out code above and add the initialization of data tables on bills.js

But locally I'm not able to test on 117hr1 or 116hr1, I'll try re running bills jobs to fix local environment, but if anyone has other data/bills I could use, let me know! Or maybe Ayesha or Ari can test the fix and check in

Screen Shot 2021-07-07 at 3 36 01 PM

@aih
Copy link
Collaborator

aih commented Jul 7, 2021

I'll test it out. I have uploaded a recent django fixture of the whole db that will have data for all of the bills. I'm not sure if it's worth downloading and restoring that dump. @leedavidr, I'll send you a message on Slack with details.

@aih aih self-assigned this Jul 7, 2021
aih added a commit that referenced this issue Jul 7, 2021
@aih
Copy link
Collaborator

aih commented Jul 7, 2021

I tried the suggested solution in a branch, but it doesn't work. This is probably due to the timing of the collection of data for the press statements from the API: the data is not available in time to create the Datatable with pagination.

IMO the way the Press Statements is currently being collected is a temporary solution. We will want to get the data from the API on the back-end and query our own back-end for that. Then render and apply the Datatable once the data is available. All of that is time-consuming, so I suggest we put this issue on the backlog for future.

image

@aih aih removed their assignment Jul 7, 2021
@leedavidr
Copy link
Collaborator

Ok thank you Ari, we'll move this down

I think there may be a way to initialize the data when we need but sounds like the current way it works is not the ideal scenario anyway

@nkinaba @cybkong

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

No branches or pull requests

3 participants