Theme checker: look for x-teme::between-items in a theme's skin folders, not only its root templates

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
laravel, php, postgresql
Lĩnh vực
cli, tooling

Hướng nghiên cứu

The warning comes from the teme:theme:check Artisan command, so start in its handler and find where it reads views/templates/* to test for x-teme::between-items. Make the scan follow @include and @extends into the skin folders, or cover every view in the theme, and add a case where the component appears only in an included skin file. Also make the database-failure path report the h1 rule as not checked rather than passed. Done when the reproduction no longer warns and the database-down run no longer prints "The theme passes" for that rule.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area/themes type/bug when/later

php artisan teme:theme:check warns "Lists don't call x-teme::between-items, so plugins can't place content between items." It seems to look for the component only in the theme's root templates (views/templates/*). A theme that keeps one folder of pages per skin, and whose root templates are one-line includes of the active skin's page (so a later update can add skins), draws its lists in the skin's own files. Those lists do call the component, but the check warns anyway.

To reproduce:

  1. A theme whose views/templates/latest.blade.php is @include('theme::skins.'.($themeSettings['skin'] ?? 'fable').'.home').
  2. The skin's home.blade.php loops over the feed and calls <x-teme::between-items :after="$loop->iteration" :last="$loop->last" /> after each item.
  3. php artisan teme:theme:check <code> still warns. The warning goes away only when the component's name also appears in the root template, for example in a comment.

Expected: the check follows @include/@extends (or scans every view in the theme) before it warns. Or the manifest could say where a theme's lists are.

Also seen in the same run: when the site's database can't be read, the check prints "The pages were not checked for an h1" and still ends with "The theme passes". A line that says the h1 rule was not checked at all, rather than passed, would help.

Ngôn ngữ chính
PHP
Star
1
Fork
1
Merge trung bình
1 giờ 40 phút
Pull request đã merge (30 ngày)
143

Chuẩn bị môi trường

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.

Issue khác của temecms/teme

Tất cả issue của temecms/teme

Issue tương tự

Thêm issue về PHP

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.