Skip to content

fix(website): improve hero install section with numbered steps#11

Open
rasca wants to merge 1 commit intogenlayerlabs:mainfrom
rasca:website-hero-fix
Open

fix(website): improve hero install section with numbered steps#11
rasca wants to merge 1 commit intogenlayerlabs:mainfrom
rasca:website-hero-fix

Conversation

@rasca
Copy link
Copy Markdown
Contributor

@rasca rasca commented Mar 24, 2026

Summary

  • Replace plain <code> snippets with clickable copy-to-clipboard buttons for install commands
  • Add numbered step indicators (①, ②) for clearer UX flow
  • Drop @genlayerlabs suffix from install commands for cleaner display

Test plan

  • Open the site and verify the hero section shows numbered steps with copy buttons
  • Click each button and confirm the correct command is copied

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Redesigned hero section with a numbered two-step installation guide for clearer user guidance
    • Added individual action buttons for each installation option to simplify the setup process
    • Enhanced visual organization with improved separation and formatting of installation steps

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 79dd6a50-fb1a-4a0f-82ae-39b2abba5367

📥 Commits

Reviewing files that changed from the base of the PR and between 3c7cd24 and b192ef4.

📒 Files selected for processing (1)
  • index.html
🚧 Files skipped from review as they are similar to previous changes (1)
  • index.html

📝 Walkthrough

Walkthrough

Restructured the hero section's installation messaging from a single "install" format to a two-step numbered instruction layout. Replaced .hero-methods CSS classes with .hero-steps, .hero-step, .step-label, .hero-step-choices, and .step-or. Added new global JavaScript functions for grid rendering, modal management, markdown rendering, and clipboard copying.

Changes

Cohort / File(s) Summary
Hero Section Restructuring & Global Functions
index.html
Converted hero install messaging from inline code options to a two-step numbered layout. Step 1 contains the marketplace add copy-to-clipboard button; step 2 presents two install options separated by "or" label. Added global functions: renderGrid(), openModal()/closeModal(), renderMarkdown(), copyText()/copySkill(). Updated CSS class structure from .hero-methods to new .hero-step* classes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • feat: add skills website #7 — Touches the same index.html and modifies identical global UI functions (renderGrid, openModal/closeModal, renderMarkdown, copyText/copySkill) and hero layout structure.

Suggested reviewers

  • dohernandez
  • jmlago
  • MuncleUscles

Poem

🐰 Two steps now guide the way so clear,
From one confusing message we veer,
Step one, step two—a numbered dance,
With copy buttons given their chance,
The hero's reborn, more organized cheer! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—improving the hero install section with numbered steps. It aligns with the primary objectives of replacing code snippets with copy buttons and adding step indicators.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 01d4520 and 3c7cd24.

📒 Files selected for processing (4)
  • CLAUDE.md
  • index.html
  • plugins/genlayer-dev/skills/genlayer-cli/SKILL.md
  • plugins/genlayer-dev/skills/write-contract/SKILL.md

Comment thread index.html
Comment thread index.html
Comment on lines +990 to +998
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'));
}
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment thread index.html
Comment on lines +1132 to +1140
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);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment thread plugins/genlayer-dev/skills/write-contract/SKILL.md
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>
@rasca rasca force-pushed the website-hero-fix branch from 3c7cd24 to b192ef4 Compare March 24, 2026 11:47
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.

3 participants