-
Notifications
You must be signed in to change notification settings - Fork 258
Enhance snippet handling #7086
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
Merged
Enhance snippet handling #7086
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
573b255
Improve snippet documentation
BlackYps 3820d4e
Add snippet to new PRs
BlackYps 22017f9
Add automation to style balance changes
BlackYps ec6a67f
Update balance snippet documentation
BlackYps c23a760
Fix index problem
BlackYps 66b1b9d
Fix path
BlackYps ead2630
Add unit icons
BlackYps 5876894
Change background of amphibious units
BlackYps c6da43b
Change background of sea buildings
BlackYps 8b822dc
Change background of air buildings
BlackYps 6cc94ab
Add enhancement icons
BlackYps e0e8e93
Compress unit icons with pngquant
BlackYps 610bcad
Compress uncompressed enhancements
BlackYps 1ca0a05
Make all unit ids uppercase
BlackYps 05b707d
Fix the workflow
BlackYps c52c442
Remove liquid tags in lua changelog
BlackYps e6855f6
Add T3 MAA icons
BlackYps 61788ac
Fix aeon T1 Pgen icon
BlackYps 1874cec
Improve balance snippet documentation
BlackYps de27fcc
Make styling functional
BlackYps bf1c60c
Only apply it on changelog pages
BlackYps 947548e
Run pr preparation only on local branches
BlackYps 01c38f3
Checkout pr branch correctly
BlackYps 2ffb4a8
Add reminder
BlackYps 160e25a
Split workflow-related changes into separate branch
BlackYps d6e7a60
Adjust snippets to have the PR number last
BlackYps 2fea640
Make arrow consistent
BlackYps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7139) Give an on-impact water vision radius of 4 to Aeon depth charges and the Solace's cluster torpedoes to be consistent with their normal on-impact vision. | ||
| - Give an on-impact water vision radius of 4 to Aeon depth charges and the Solace's cluster torpedoes to be consistent with their normal on-impact vision (#7139). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| - (#7104) Fix computing the wrong area in the navigational mesh | ||
|
|
||
| The new values may differ from the old values by +/- 15%. | ||
| - Fix computing the wrong area in the navigational mesh. The new values may differ from the old values by +/- 15% (#7104). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7127) Fix French locale for Selen's toggle incorrectly saying that it toggles the Selen's cloak, when it actually only toggles selection priority, and the cloak always activates when stationary. | ||
| - Fix French locale for Selen's toggle incorrectly saying that it toggles the Selen's cloak, when it actually only toggles selection priority, and the cloak always activates when stationary (#7127). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7129) Fix typo in unlocalised version of the descriptive name of the UEF T3 Support Land Factory. | ||
| - Fix typo in unlocalised version of the descriptive name of the UEF T3 Support Land Factory (#7129). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7139) Align the on-impact vision radius of the Lobo's (UEL0103) fragmentation shell, Aeon depth charges, and the Solace's cluster torpedoes to the engine's vision grid (5 -> 4). | ||
| - Align the on-impact vision radius of the Lobo's (UEL0103) fragmentation shell, Aeon depth charges, and the Solace's cluster torpedoes to the engine's vision grid (5 -> 4) (#7139). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7149) Fix missing share condition default causing a score board UI loading error when the game was launched using the single player command line launch option. | ||
| - Fix missing share condition default causing a score board UI loading error when the game was launched using the single player command line launch option (#7149). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Fix the icon of the Aeon T1 power generator (#7095). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7036) Game repository: Update the setup instructions for the development environment. | ||
| - Game repository: Update the setup instructions for the development environment (#7036). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7106) Generate BaseTemplate tables at import time instead of parsing them from lua source files. | ||
| - Generate BaseTemplate tables at import time instead of parsing them from lua source files (#7106). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#7137) Add missing annotation for `CommonArmy` game option. | ||
| - Add missing annotation for `CommonArmy` game option (#7137). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| - (#6847) Segment formations logic into different files and simplify category filters. | ||
| - Segment formations logic into different files and simplify category filters (#6847). |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| Jekyll::Hooks.register [:pages, :documents], :post_render do |doc| | ||
|
|
||
| apply = | ||
| # Everything in _posts | ||
| (doc.respond_to?(:collection) && doc.collection.label == "posts") || | ||
| # Generated changelogs | ||
| doc.respond_to?(:path) && File.basename(doc.path) == "fafbeta.md" || | ||
| doc.respond_to?(:path) && File.basename(doc.path) == "fafdevelop.md" | ||
|
|
||
| next unless apply | ||
|
|
||
| # Use https://regex101.com/ to debug regex. | ||
| doc.output.gsub!( | ||
| /<li>([^<]+?)<ul>\s*<li>([^<]+?:\s)([^<]+)\s->\s([^<]+)<\/li>/, | ||
| '<li><span class="change-category">\1</span><ul> <li><span class="change">\2</span><span class="old">\3</span> → <span class="new">\4</span></li>' | ||
| ) | ||
|
|
||
| # Needed if there is more than one change per category | ||
| doc.output.gsub!( | ||
| /<li>([^<]+?:\s)([^<]+)\s->\s([^<]+)<\/li>/, | ||
| '<li><span class="change">\1</span><span class="old">\2</span> → <span class="new">\3</span></li>' | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| ) | ||
|
|
||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| module Jekyll | ||
| class UnitBlock < Liquid::Block | ||
|
|
||
| def initialize(tag_name, markup, tokens) | ||
| super | ||
| @unit_id = markup.strip | ||
| end | ||
|
|
||
| def render(context) | ||
| name = super.strip | ||
|
|
||
| page = context.registers[:page] | ||
|
|
||
| is_post = page["collection"] == "posts" | ||
| is_fafbeta = File.basename(page["path"]) == "fafbeta.md" | ||
| is_fafdevelop = File.basename(page["path"]) == "fafdevelop.md" | ||
|
|
||
| apply = is_post || is_fafbeta || is_fafdevelop | ||
| unless apply | ||
| return "{% unit #{@unit_id} %}\n#{name}\n{% endunit %}" | ||
| end | ||
|
|
||
| icon_name = | ||
| if @unit_id.start_with?("enhancements") | ||
| "#{@unit_id}.png" | ||
| else | ||
| "#{@unit_id.upcase}_icon.png" | ||
| end | ||
|
|
||
| <<~HTML | ||
| <div class="unit-header"> | ||
| <img class="unit-icon" | ||
| src="/assets/icons/#{icon_name}"> | ||
| <span class="unit-name">#{name}</span> | ||
| </div> | ||
| HTML | ||
| end | ||
| end | ||
| end | ||
|
|
||
| Liquid::Template.register_tag('unit', Jekyll::UnitBlock) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| .unit-header { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| margin-top: 2rem; | ||
| font-size: 1.2rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .unit-icon { | ||
| width: 64px; | ||
| height: 64px; | ||
| } | ||
|
|
||
| .unit-name { | ||
| display: inline-block; | ||
| } | ||
|
|
||
| .change-category { | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .change { | ||
| font-weight: 300; | ||
| } | ||
|
|
||
| .old { | ||
| color: #d73a49; | ||
| text-decoration: line-through; | ||
| } | ||
|
|
||
| .new { | ||
| color: #2da44e; | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.