SolidOS / SolidOS/solid-ui

Proposal: Remove logging from Solid UI and add it as a module that is exposed through the data browser

Đang mở
#253 7 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

enhancement
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:

  1. 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
  2. if the environment supports console (e.g. Node), it will use console.log to output the messages, or
  3. 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.