Comments (2)
Starting to enumerate, we can create separate tickets for these if needed:
- https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L70
getRegionalProjects
fetches a limit of 9999 - @frozenhelium do you know this one / why / can we mitigate? - Same for
getProjects
: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L115 getCountries
: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L155 (this we probably just want to paginate on frontend).- This is silly, just for the "Actions": https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L199 - I'm okay implementing exceptions on the API for things like this, but would rather just implement a consistent pattern of paginating on the frontend.
getAppealsList
: https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L232 - this one is the most suspicious to me -- need to dig in a bit more here - I believe the frontend does some aggregations and calculations here with the results, which seem like they should move to happening on the backend. But we need to dig a bit more into this one.getLastMonthEmergencies
https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L297 - again, can probably just paginate here.getEventsList
- gets all events in a country https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L341 - need to see where this is used exactlygetSitrepsByEventId
https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L366getAdmAreaAppealList
https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L421 - again, this seems suspicious / like we should not need to fetch everything here.- .....
Looking through, we actually have a LOT of instances where we make calls with a high limit
value. I think for MOST of them, we just want to switch to doing pagination on the frontend. For MOST cases, it's really harmless - we need to display everything on a map, or in a dropdown, we know there will likely not be many results, but don't want to cap it, so we set a high limit -- just setting pagination with a page size of 100 or 200 on the frontend should be fine for these.
There's cases like the call for "Active Personnel": https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L576 that need to fetch all items to display in a single chart - all these cases I think we should just handle in the same way we did CSV pagination.
I think then the only one that I'm really concerned about is the fetching of Appeals like https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L232 - I can't see a good reason why we need to fetch ALL appeals from the backend. We need to dig more into that and see if we can swap out the logic there, perhaps by doing some aggregation on the backend. For the rest, I would advocate finding a good pattern to just moving all these instances to doing pagination managed by the frontend.
Also, @frozenhelium, could you just comment on https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L70 getRegionalProjects
- if this is needed, we can use the same frontend pagination approach.
cc @frozenhelium @tovari @szabozoltan69 @tnagorra
from go-web-app.
Would you mind to review @batpad, if these still need to be resolved? Thanks.
from go-web-app.
Related Issues (20)
- Create an `Operational Learnings` navigation item under the `Learn` navigation tab
- Create a new Operational Learning skeleton page
- Add filters for Operational Learning with a `selected filters` view
- Fetch summaries and key insights from API based on filters
- List summaries by `sector` and by `component`
- Show Key Insights with a disclaimer
- List `Sources` for each summary in an expandable view
- Create a `View all Extracts` Modal to list all the `extracts` for a summary
- Edge Matching GO Admin 0 to Subnational Boundaries HOT 1
- IFRC Delegation Offices Data Maintenance HOT 2
- Minor fixes: June 26, 2024
- DREF export function doesn't work today
- Implement guest user permission checks across the entire application and enforce restrictions at the route level
- Review all buttons for view/edit/delete actions and disable or hide them for guest users
- Chips (Tags, Pills) Component
- Implement Excel export download based on the language set
- [PROD] Emergency page blank (doesn't have emergency name or country name etc.) even though those details are there in back end HOT 2
- Re-validation of user-accounts: are they still eligible for access. HOT 1
- Show cone of uncertainty, path, and affected areas for GDACS and WFP ADAM
- Make "Download Data" button for operational learning more user friendly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-web-app.