fix(website): improve hero install section with numbered steps#11
fix(website): improve hero install section with numbered steps#11rasca wants to merge 1 commit intogenlayerlabs:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRestructured the hero section's installation messaging from a single "install" format to a two-step numbered instruction layout. Replaced Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@index.html`:
- Around line 582-601: The contract skeleton uses the old decorator-based
pattern (`@gl.contract`) — change the class declaration to use inheritance
instead: replace the top-line decorator and declaration with "class
MyContract(gl.Contract):" (remove "@gl.contract") while keeping the rest of the
class intact (fields owner, items and methods get_item and set_item) and
preserving the `@gl.public.view` and `@gl.public.write` decorators on get_item and
set_item so behavior remains unchanged.
- Around line 1132-1140: The copySkill function currently hardcodes the plugin
install string; update it to use the per-skill plugin property instead: in
copySkill (which iterates over skills.build and skills.operate and looks up
skill by id), when skill.badge === 'plugin' construct cmd from skill.plugin
(e.g. use skill.plugin directly or format it into the install string) instead of
the fixed "genlayer-dev@genlayerlabs"; if skill.plugin is missing, fall back to
skill.id; leave the final copyText(cmd, btn) call unchanged.
- Around line 990-998: The modal copy handler uses a hardcoded plugin name for
any plugin-badged skill; update the logic in the click listener for element
'modal-copy-btn' so it uses a per-skill plugin property (e.g.,
currentSkill.plugin) instead of the constant "genlayer-dev": construct the
command as `/plugin install ${currentSkill.plugin}@genlayerlabs` when
currentSkill.badge === 'plugin', and keep a safe fallback (e.g., default to
'genlayer-dev' or currentSkill.id) if plugin is missing; also add a plugin field
to each plugin-style skill object (for example in the skill entries for
'genlayernode') so currentSkill.plugin is present.
In `@plugins/genlayer-dev/skills/write-contract/SKILL.md`:
- Line 26: Update index.html's write-contract example to use the
inheritance-based declaration used in SKILL.md by replacing the decorator
pattern "@gl.contract\nclass MyContract:" with the new pattern "class
MyContract(gl.Contract):" (and any associated import or instantiation examples)
so the example matches the SKILL.md contract class MyContract that inherits from
gl.Contract instead of using `@gl.contract`; ensure any explanatory text referring
to the decorator is updated or removed to reflect the inheritance approach.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ce2b2fd2-6501-48b3-ada4-f9cb53a9f727
📒 Files selected for processing (4)
CLAUDE.mdindex.htmlplugins/genlayer-dev/skills/genlayer-cli/SKILL.mdplugins/genlayer-dev/skills/write-contract/SKILL.md
| document.getElementById('modal-copy-btn').addEventListener('click', () => { | ||
| if (currentSkill) { | ||
| const badge = currentSkill.badge; | ||
| const cmd = badge === 'plugin' | ||
| ? `/plugin install genlayer-dev@genlayerlabs` | ||
| : currentSkill.id; | ||
| copyText(cmd, document.getElementById('modal-copy-btn')); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Modal copy button copies wrong command for genlayernode skill.
The logic hardcodes /plugin install genlayer-dev@genlayerlabs for all plugin-badged skills, but genlayernode is in a separate plugin and should copy /plugin install genlayernode@genlayerlabs.
Proposed fix - add plugin field to skill data
Add a plugin field to each skill in the data object, then use it in the copy logic:
document.getElementById('modal-copy-btn').addEventListener('click', () => {
if (currentSkill) {
- const badge = currentSkill.badge;
- const cmd = badge === 'plugin'
- ? `/plugin install genlayer-dev@genlayerlabs`
- : currentSkill.id;
+ const cmd = currentSkill.badge === 'plugin'
+ ? `/plugin install ${currentSkill.plugin}@genlayerlabs`
+ : currentSkill.id;
copyText(cmd, document.getElementById('modal-copy-btn'));
}
});Then update skill objects to include the plugin name:
{
id: 'genlayernode',
name: 'Validator Node Setup',
plugin: 'genlayernode', // Add this
// ...
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@index.html` around lines 990 - 998, The modal copy handler uses a hardcoded
plugin name for any plugin-badged skill; update the logic in the click listener
for element 'modal-copy-btn' so it uses a per-skill plugin property (e.g.,
currentSkill.plugin) instead of the constant "genlayer-dev": construct the
command as `/plugin install ${currentSkill.plugin}@genlayerlabs` when
currentSkill.badge === 'plugin', and keep a safe fallback (e.g., default to
'genlayer-dev' or currentSkill.id) if plugin is missing; also add a plugin field
to each plugin-style skill object (for example in the skill entries for
'genlayernode') so currentSkill.plugin is present.
| function copySkill(skillId, btn) { | ||
| const allSkills = [...skills.build, ...skills.operate]; | ||
| const skill = allSkills.find(s => s.id === skillId); | ||
| if (!skill) return; | ||
| const cmd = skill.badge === 'plugin' | ||
| ? `/plugin install genlayer-dev@genlayerlabs` | ||
| : skill.id; | ||
| copyText(cmd, btn); | ||
| } |
There was a problem hiding this comment.
Card copy button has the same plugin hardcoding issue.
The copySkill function also hardcodes genlayer-dev@genlayerlabs for all plugin-badged skills. Apply the same fix using a plugin field on each skill object.
Proposed fix
function copySkill(skillId, btn) {
const allSkills = [...skills.build, ...skills.operate];
const skill = allSkills.find(s => s.id === skillId);
if (!skill) return;
- const cmd = skill.badge === 'plugin'
- ? `/plugin install genlayer-dev@genlayerlabs`
- : skill.id;
+ const cmd = skill.badge === 'plugin'
+ ? `/plugin install ${skill.plugin}@genlayerlabs`
+ : skill.id;
copyText(cmd, btn);
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@index.html` around lines 1132 - 1140, The copySkill function currently
hardcodes the plugin install string; update it to use the per-skill plugin
property instead: in copySkill (which iterates over skills.build and
skills.operate and looks up skill by id), when skill.badge === 'plugin'
construct cmd from skill.plugin (e.g. use skill.plugin directly or format it
into the install string) instead of the fixed "genlayer-dev@genlayerlabs"; if
skill.plugin is missing, fall back to skill.id; leave the final copyText(cmd,
btn) call unchanged.
Replace plain code snippets with clickable copy-to-clipboard buttons for install commands and add numbered step indicators for clearer UX. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
<code>snippets with clickable copy-to-clipboard buttons for install commands@genlayerlabssuffix from install commands for cleaner displayTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit