Proposal: Remove logging from Solid UI and add it as a module that is exposed through the data browser
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 153
- Fork
- 46
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
I'm currently working on the log module, which exposes a set of methods that mostly do one of three things, depending on the environment:
- if the environment has the document object (e.g. is a browser), it will look for an element with id "status" and append lines to it with time, type of log message and the message whenever the methods are called with a message, or
- if the environment supports console (e.g. Node), it will use console.log to output the messages, or
- do nothing
(The other methods that do not log messages are various configuration methods.)
I think it's weird that the module is dependent on a global element somehow being available, and think it would be better to expose the API through a module that is exposed through the data browser, probably through the DataBrowserContext interface that is made available to views through methods such as render. (It is currently defined in pane-registry.)
Data browser implementations would handle logging differently, but expose the same API. This module could then be passed to methods in Solid UI that requires logging, making the need for log module in Solid UI obsolete.
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Đọc module log hiện có và interface DataBrowserContext trong index.d.ts của pane-registry, sau đó truy vết cách các view nhận context thông qua những phương thức như render. Hoàn tất nghĩa là Solid UI không còn phụ thuộc vào phần tử trạng thái toàn cục của module log và data browser cung cấp một API logging chung để các implementation xử lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- frontend
- Loại issue
- Tái cấu trúc
- Độ 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100