Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor view finder for publication templates to check file extensions instead of if view exists #778

Merged
merged 8 commits into from
Dec 27, 2022

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Dec 27, 2022

Refactors to check if template key ends with .blade.php and using that to signify if it's an anonymous view. This leads to a more verbose and intuitive system. If you specify a filename, Hyde will use the filename. If not, Hyde will assume it's a globally registered view.

This may break code on the publications-feature branch as the schemas need to be updated: (see 9b471ef for an example)

- "detailTemplate": "detail",
- "listTemplate": "list",
+ "detailTemplate": "detail.blade.php",
+ "listTemplate": "list.blade.php",

The files are still assumed to be in the same directory as the schema.json file.

@caendesilva
Copy link
Member Author

caendesilva commented Dec 27, 2022

This diff 9b471ef might be useful for finding files for normalizing all these test schemas to use the same names

Edit: Resolved in b86936c

@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #778 (b86936c) into publications-feature (7ee84b5) will increase coverage by 0.00%.
The diff coverage is n/a.

@@                   Coverage Diff                   @@
##             publications-feature     #778   +/-   ##
=======================================================
  Coverage                   99.35%   99.35%           
  Complexity                   1396     1396           
=======================================================
  Files                         162      162           
  Lines                        3860     3861    +1     
=======================================================
+ Hits                         3835     3836    +1     
  Misses                         25       25           
Impacted Files Coverage Δ
.../src/Framework/Actions/PublicationPageCompiler.php 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@caendesilva caendesilva marked this pull request as ready for review December 27, 2022 13:26
@caendesilva caendesilva merged commit 9bf1fa6 into publications-feature Dec 27, 2022
@caendesilva caendesilva deleted the publications-feature-refactors branch December 27, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants