CodeForPhilly / CodeForPhilly/stately
Queue xhr requests until auth completed
- Ngôn ngữ chính
- Python
- Star
- 22
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
In [index.js](https://github.com/CodeForPhilly/stately/blob/master/client/src/index.js) we're currently breaking the choo paradigm by firing an xhr request out in the wild, before even initialising the app. This is necessary because all the subsequent requests depend on the session that should be set by that initial request.
I was thinking that one of the only other ways to accommodate this would be to "queue" any subsequent xhr requests until the initial auth request is completed (since subsequent requests happen asynchronously). I thought it was crazy, but @yoshuawuyts just thought of the same thing, so maybe it's not so nuts. We'd just want to ensure that queuing is explicit so there's no magic, ie.
``` javascript
xhr({uri: '...'}, waitForAuth=True)
```
(but, ya know, in javascript not python)
This is definitely "backlog"
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu tại client/src/index.js và theo dõi request xác thực ban đầu cùng các lệnh gọi xhr sau đó. Làm rõ với các maintainer về cách hành vi wait-for-auth rõ ràng phải hoạt động và nó áp dụng cho những request nào. Được xem là hoàn tất khi các request phụ thuộc chờ đến khi xác thực hoàn tất mà không dựa vào hành vi ngầm; issue không nêu test nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 28/100