Skip to content

Commit 0f5f004

Browse files
committed
Enhance button configuration UI: add styling for "Add Button" group and adjust layout for improved usability.
1 parent 0b02dd2 commit 0f5f004

File tree

4 files changed

+63
-37
lines changed

4 files changed

+63
-37
lines changed

popup-page-styles/popup-base.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ These rules set up the basic typography, spacing, and color scheme for the inter
1818
--bg-color: #f9f9f9; /* Very light gray for background */
1919
--text-color: #333; /* Dark gray for primary text */
2020
--separator-color: #bbb; /* Medium gray for separators */
21+
--primary-color-faded: rgba(122, 92, 200, 0.05);
2122
--hover-bg-color: #e6e6e6; /* Light gray on hover */
2223
--transition-duration: 0.3s; /* Standard transition duration */
2324
--transition-duration-release: 0.4s; /* Slower transition duration for release */
@@ -140,3 +141,4 @@ h2:hover {
140141
transition: color var(--transition-duration-release) ease;
141142
}
142143

144+

popup-page-styles/popup-buttons.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@ button.danger:hover {
6363
/* 2. Custom Buttons Section */
6464
/* ------------------------------------------------------------------------- */
6565

66+
/* Group for the "Add Button" form controls */
67+
.add-button-group {
68+
border: 1px dashed var(--primary-color);
69+
padding: 12px;
70+
margin-bottom: 16px;
71+
border-radius: 8px;
72+
background-color: var(--primary-color-faded);
73+
}
74+
75+
/* Adjust margins for rows inside the group to avoid double margins */
76+
.add-button-group .row {
77+
margin-bottom: 8px;
78+
}
79+
80+
/* Remove margin from the last row inside the group */
81+
.add-button-group .row:last-child {
82+
margin-bottom: 0;
83+
}
84+
6685
/* Container for the custom button list */
6786
#buttonCardsList {
6887
border: 1px solid var(--border-color);

popup-page-styles/popup-theme.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ body.dark-theme {
2222
--bg-color: #222;
2323
--text-color: #eee;
2424
--separator-color: #666;
25+
--primary-color-faded: rgba(154, 121, 211, 0.1);
2526
--hover-bg-color: #333;
2627
--section-header-bg: #2a2a2a;
2728
--manual-bg: #1e1e1e;

popup.html

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -120,46 +120,50 @@ <h2>Profile</h2>
120120
<!-- Button Configuration via button cards (buttons have their UI - each on card that is added dynamically) -->
121121
<section class="section">
122122
<h2>Button Configuration</h2>
123-
<div class="row">
124-
<input
125-
type="text"
126-
id="buttonIcon"
127-
placeholder=""
128-
class="emoji-input"
129-
title="Button icon that will be clickable in the chat interface, or you may have text here or multiple emojis. (Emoji menu Win+. Or you may ask AI for them and copy)"
130-
aria-label="Button icon"
131-
/>
123+
<div class="add-button-group">
124+
<div class="row">
125+
<input
126+
type="text"
127+
id="buttonIcon"
128+
placeholder=""
129+
class="emoji-input"
130+
title="Button icon that will be clickable in the chat interface, or you may have text here or multiple emojis. (Emoji menu Win+. Or you may ask AI for them and copy)"
131+
aria-label="Button icon"
132+
/>
132133

133-
<textarea
134-
id="buttonText"
135-
placeholder="Button Template Text To be Inserted"
136-
class="text-input"
137-
rows="1"
138-
title="This will be inserting text into the chat input when the button is clicked, into textbox after your text"
139-
aria-label="Button template text"
140-
></textarea>
141-
<label
142-
class="checkbox-row"
143-
for="buttonAutoSendToggle"
144-
title="If checked, clicking the new button will automatically send the prompt. This setting can be overridden by the global auto-send toggle below."
145-
>
146-
<input type="checkbox" id="buttonAutoSendToggle" checked />
147-
<span>Auto-send</span>
148-
</label>
134+
<textarea
135+
id="buttonText"
136+
placeholder="Button Template Text To be Inserted"
137+
class="text-input"
138+
rows="1"
139+
title="This will be inserting text into the chat input when the button is clicked, into textbox after your text"
140+
aria-label="Button template text"
141+
></textarea>
142+
<label
143+
class="checkbox-row"
144+
for="buttonAutoSendToggle"
145+
title="If checked, clicking the new button will automatically send the prompt. This setting can be overridden by the global auto-send toggle below."
146+
>
147+
<input type="checkbox" id="buttonAutoSendToggle" checked />
148+
<span>Auto-send</span>
149+
</label>
150+
</div>
151+
<div class="row">
152+
<button
153+
id="addButton"
154+
title="Add a new prompt button using the icon, text, and auto-send setting from above."
155+
>
156+
Add Button
157+
</button>
158+
<button
159+
id="clearText"
160+
title="Clear the icon and text fields for adding a new button."
161+
>
162+
Clear Text
163+
</button>
164+
</div>
149165
</div>
150166
<div class="row">
151-
<button
152-
id="addButton"
153-
title="Add a new prompt button using the icon, text, and auto-send setting from above."
154-
>
155-
Add Button
156-
</button>
157-
<button
158-
id="clearText"
159-
title="Clear the icon and text fields for adding a new button."
160-
>
161-
Clear Text
162-
</button>
163167
<button
164168
id="addSeparator"
165169
title="Add a visual separator to the button list to organize your prompts."

0 commit comments

Comments
 (0)