danemery-ai2 commited on
Commit
afb9b4c
·
unverified ·
1 Parent(s): 64716c3

Add floating feedback button (#28)

Browse files
Files changed (2) hide show
  1. content.py +30 -0
  2. ui_components.py +6 -0
content.py CHANGED
@@ -452,4 +452,34 @@ span.wrap[tabindex="0"][role="button"][data-editable="false"] {
452
  .styler {
453
  background: none;
454
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455
  """
 
452
  .styler {
453
  background: none;
454
  }
455
+
456
+ #floating-feedback-button {
457
+ position: fixed;
458
+ bottom: 20px;
459
+ right: 20px;
460
+ z-index: 1000;
461
+ background-color: #345d60;
462
+ color: white;
463
+ border: none;
464
+ border-radius: 4px;
465
+ padding: 15px 20px;
466
+ font-size: 16px;
467
+ cursor: pointer;
468
+ box-shadow: 0 4px 8px rgba(0,0,0,0.2);
469
+ transition: all 0.3s ease;
470
+ text-decoration: none;
471
+ }
472
+
473
+ @media (max-width: 768px) {
474
+ #floating-feedback-button {
475
+ padding: 12px 16px;
476
+ font-size: 12px;
477
+ }
478
+ }
479
+
480
+ #floating-feedback-button:hover {
481
+ background-color: #5d888b;
482
+ transform: translateY(-2px);
483
+ box-shadow: 0 6px 12px rgba(0,0,0,0.3);
484
+ }
485
  """
ui_components.py CHANGED
@@ -334,6 +334,12 @@ def create_leaderboard_display(
334
  )
335
  gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
336
 
 
 
 
 
 
 
337
  # Put table and key into an accordion
338
  with gr.Accordion("Show / Hide Table View", open=True, elem_id="leaderboard-accordion"):
339
  gr.HTML(value=legend_markdown, elem_id="legend-markdown")
 
334
  )
335
  gr.HTML(SCATTER_DISCLAIMER, elem_id="scatter-disclaimer")
336
 
337
+ # Floating feedback button
338
+ floating_feedback_button_html = """
339
+ <a id="floating-feedback-button" href="https://docs.google.com/forms/d/e/1FAIpQLSfJdVkD62aPYh8XehN2FrSeHUWt488Ejc-QdtuZn5NZ3eNoxA/viewform">Have feedback?</a>
340
+ """
341
+ gr.HTML(floating_feedback_button_html)
342
+
343
  # Put table and key into an accordion
344
  with gr.Accordion("Show / Hide Table View", open=True, elem_id="leaderboard-accordion"):
345
  gr.HTML(value=legend_markdown, elem_id="legend-markdown")