-
Notifications
You must be signed in to change notification settings - Fork 0
Add 1174. Immediate Food Delivery II solution #271
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
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
04a4996
Add 1174. Immediate Food Delivery II solution
myoshi2891 f0ddc02
Fix Immediate Food Delivery II solutions: handle edge cases and preve…
myoshi2891 10d723b
fix(html): resolve visual issues in Immediate Food Delivery II
myoshi2891 ef7c383
fix: add MD031 compliance and division-by-zero protection
myoshi2891 9456f54
fix: refine flowchart arrow alignment and numeric literal consistency
myoshi2891 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| description: SVG flowchart and data visualization best practices to avoid common rendering issues | ||
| --- | ||
|
|
||
| # SVG Flowchart & Data Visualization Guidelines | ||
|
|
||
| ## Arrow Marker Best Practices | ||
|
|
||
| 1. **`refX` should be less than the arrowhead length.** If your arrowhead path is `M0,0 L0,6 L9,3 z` (length=9), set `refX` to `5` (not `9`). A `refX` equal to the arrowhead length causes the tip to land exactly at the path endpoint, which gets hidden behind destination nodes. | ||
|
|
||
| 2. **End arrow paths 5-10px before the target node boundary.** This leaves room for the arrowhead to be visible and not obscured by the node's fill. | ||
|
|
||
| 3. **Use `markerUnits="strokeWidth"`** for consistent arrowhead sizing regardless of stroke width changes. | ||
|
|
||
| ## SVG viewBox Sizing | ||
|
|
||
| 1. **Always add 30-50px padding** below the last element in your viewBox height. If the last element ends at y=940 with ry=35, set viewBox height to at least `1000`. | ||
|
|
||
| 2. **For dynamic data tables**, calculate viewBox height based on number of rows: | ||
|
|
||
| ``` | ||
| viewBox height = header_height + (row_count × row_height) + summary_text_spacing + padding | ||
| ``` | ||
|
|
||
| ## Text Overlap Prevention | ||
|
|
||
| 1. **Summary text below data tables**: Position summary text at least `30px` below the last row's bottom edge (y + height), not at a fixed y coordinate. | ||
|
|
||
| 2. **For N data rows at spacing S starting at Y0**: Last row bottom = `Y0 + (N-1) × S + row_height`. Summary text y should be `last_row_bottom + 30`. | ||
|
|
||
| ## Prism.js Copy Button with Tailwind CSS | ||
|
|
||
| Tailwind's preflight CSS resets button styles. Override with `!important`: | ||
|
|
||
| ```css | ||
| .code-toolbar > .toolbar { | ||
| opacity: 1 !important; | ||
| } | ||
| .code-toolbar > .toolbar .toolbar-item { | ||
| display: inline-block !important; | ||
| } | ||
| .code-toolbar > .toolbar button, | ||
| .code-toolbar > .toolbar a, | ||
| .code-toolbar > .toolbar span { | ||
| background: #10b981 !important; | ||
| color: white !important; | ||
| border: none !important; | ||
| display: inline-block !important; | ||
| opacity: 1 !important; | ||
| visibility: visible !important; | ||
| } | ||
| ``` | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
フェンス前後の空行が必要です(MD031)。
markdownlint の指摘どおり、フェンスの前後に空行を入れてください。
🧹 修正案
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 20-20: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
🤖 Prompt for AI Agents