jrrribeiro commited on
Commit
8483be7
·
verified ·
1 Parent(s): 2f0dbd4

Sync app from GitHub Actions

Browse files
Files changed (2) hide show
  1. src/ui/app_factory.py +14 -6
  2. src/ui/theme.py +138 -0
src/ui/app_factory.py CHANGED
@@ -3947,20 +3947,28 @@ def create_app() -> gr.Blocks:
3947
 
3948
  table = gr.Dataframe(
3949
  headers=[
3950
- "Key",
3951
  "Audio",
3952
  "Species",
3953
- "Confidence",
3954
  "Start",
3955
  "End",
3956
  "Status",
3957
- "Version",
3958
- "Conflict",
3959
- "Severity",
3960
  ],
3961
  label="Validation queue",
3962
  interactive=False,
3963
- elem_classes=["bn-dataframe"],
 
 
 
 
 
 
 
 
3964
  )
3965
  selected_index = gr.Number(label="Selected row", value=0, precision=0, visible=False)
3966
 
 
3947
 
3948
  table = gr.Dataframe(
3949
  headers=[
3950
+ "ID",
3951
  "Audio",
3952
  "Species",
3953
+ "Conf.",
3954
  "Start",
3955
  "End",
3956
  "Status",
3957
+ "Ver.",
3958
+ "Flag",
3959
+ "Risk",
3960
  ],
3961
  label="Validation queue",
3962
  interactive=False,
3963
+ row_count=(10, "fixed"),
3964
+ col_count=(10, "fixed"),
3965
+ datatype=["str", "str", "str", "number", "number", "number", "str", "number", "str", "str"],
3966
+ max_height=460,
3967
+ wrap=False,
3968
+ column_widths=["8%", "24%", "21%", "10%", "8%", "8%", "14%", "7%", "0%", "0%"],
3969
+ show_row_numbers=False,
3970
+ elem_id="bn-validation-queue-table",
3971
+ elem_classes=["bn-dataframe", "bn-validation-dataframe"],
3972
  )
3973
  selected_index = gr.Number(label="Selected row", value=0, precision=0, visible=False)
3974
 
src/ui/theme.py CHANGED
@@ -961,6 +961,134 @@ button.bn-report-download-action-blue:hover {
961
  font-weight: 750 !important;
962
  }
963
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
  textarea,
965
  input,
966
  select {
@@ -1082,6 +1210,16 @@ select {
1082
  .bn-dataframe table {
1083
  min-width: 780px !important;
1084
  }
 
 
 
 
 
 
 
 
 
 
1085
  }
1086
  """
1087
 
 
961
  font-weight: 750 !important;
962
  }
963
 
964
+ .bn-validation-dataframe {
965
+ overflow: hidden !important;
966
+ border: 1px solid var(--bn-border) !important;
967
+ border-radius: 8px !important;
968
+ background: #ffffff !important;
969
+ }
970
+
971
+ #bn-validation-queue-table,
972
+ #bn-validation-queue-table .wrap,
973
+ #bn-validation-queue-table .table-wrap,
974
+ #bn-validation-queue-table [data-testid="dataframe"],
975
+ #bn-validation-queue-table [role="grid"] {
976
+ max-width: 100% !important;
977
+ overflow-x: hidden !important;
978
+ }
979
+
980
+ #bn-validation-queue-table table {
981
+ width: 100% !important;
982
+ min-width: 0 !important;
983
+ table-layout: fixed !important;
984
+ border-collapse: separate !important;
985
+ border-spacing: 0 !important;
986
+ }
987
+
988
+ #bn-validation-queue-table th,
989
+ #bn-validation-queue-table td {
990
+ overflow: hidden !important;
991
+ text-overflow: ellipsis !important;
992
+ white-space: nowrap !important;
993
+ padding: 9px 8px !important;
994
+ border-color: #e6edf5 !important;
995
+ vertical-align: middle !important;
996
+ }
997
+
998
+ #bn-validation-queue-table th:nth-child(1),
999
+ #bn-validation-queue-table td:nth-child(1) {
1000
+ width: 8% !important;
1001
+ }
1002
+
1003
+ #bn-validation-queue-table th:nth-child(2),
1004
+ #bn-validation-queue-table td:nth-child(2) {
1005
+ width: 24% !important;
1006
+ }
1007
+
1008
+ #bn-validation-queue-table th:nth-child(3),
1009
+ #bn-validation-queue-table td:nth-child(3) {
1010
+ width: 21% !important;
1011
+ }
1012
+
1013
+ #bn-validation-queue-table th:nth-child(4),
1014
+ #bn-validation-queue-table td:nth-child(4) {
1015
+ width: 10% !important;
1016
+ }
1017
+
1018
+ #bn-validation-queue-table th:nth-child(5),
1019
+ #bn-validation-queue-table td:nth-child(5),
1020
+ #bn-validation-queue-table th:nth-child(6),
1021
+ #bn-validation-queue-table td:nth-child(6) {
1022
+ width: 8% !important;
1023
+ }
1024
+
1025
+ #bn-validation-queue-table th:nth-child(7),
1026
+ #bn-validation-queue-table td:nth-child(7) {
1027
+ width: 14% !important;
1028
+ }
1029
+
1030
+ #bn-validation-queue-table th:nth-child(8),
1031
+ #bn-validation-queue-table td:nth-child(8) {
1032
+ width: 7% !important;
1033
+ }
1034
+
1035
+ #bn-validation-queue-table th:nth-child(9),
1036
+ #bn-validation-queue-table td:nth-child(9),
1037
+ #bn-validation-queue-table th:nth-child(10),
1038
+ #bn-validation-queue-table td:nth-child(10) {
1039
+ display: none !important;
1040
+ }
1041
+
1042
+ #bn-validation-queue-table th {
1043
+ background: #eef4fb !important;
1044
+ color: #1f344d !important;
1045
+ font-size: 12px !important;
1046
+ letter-spacing: 0 !important;
1047
+ text-transform: uppercase !important;
1048
+ }
1049
+
1050
+ #bn-validation-queue-table td {
1051
+ color: #102033 !important;
1052
+ font-size: 13px !important;
1053
+ }
1054
+
1055
+ #bn-validation-queue-table tbody tr:nth-child(even) td {
1056
+ background: #fbfdff !important;
1057
+ }
1058
+
1059
+ #bn-validation-queue-table tbody tr:hover td {
1060
+ background: #eff6ff !important;
1061
+ cursor: pointer !important;
1062
+ }
1063
+
1064
+ #bn-validation-queue-table td:nth-child(1),
1065
+ #bn-validation-queue-table td:nth-child(2) {
1066
+ color: #475467 !important;
1067
+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace !important;
1068
+ font-size: 12px !important;
1069
+ }
1070
+
1071
+ #bn-validation-queue-table td:nth-child(4),
1072
+ #bn-validation-queue-table td:nth-child(5),
1073
+ #bn-validation-queue-table td:nth-child(6),
1074
+ #bn-validation-queue-table td:nth-child(8) {
1075
+ text-align: right !important;
1076
+ font-variant-numeric: tabular-nums !important;
1077
+ }
1078
+
1079
+ #bn-validation-queue-table td:nth-child(7) {
1080
+ color: #0b5e86 !important;
1081
+ font-weight: 750 !important;
1082
+ }
1083
+
1084
+ #bn-validation-queue-table * {
1085
+ scrollbar-width: none !important;
1086
+ }
1087
+
1088
+ #bn-validation-queue-table *::-webkit-scrollbar {
1089
+ display: none !important;
1090
+ }
1091
+
1092
  textarea,
1093
  input,
1094
  select {
 
1210
  .bn-dataframe table {
1211
  min-width: 780px !important;
1212
  }
1213
+
1214
+ #bn-validation-queue-table table {
1215
+ min-width: 0 !important;
1216
+ }
1217
+
1218
+ #bn-validation-queue-table th,
1219
+ #bn-validation-queue-table td {
1220
+ padding: 8px 6px !important;
1221
+ font-size: 12px !important;
1222
+ }
1223
  }
1224
  """
1225