bluenevus commited on
Commit
c058191
·
verified ·
1 Parent(s): 8fa5cd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -27
app.py CHANGED
@@ -231,29 +231,26 @@ def left_navbar_static():
231
  ], style={"padding": "1rem", "backgroundColor": "#f8f9fa", "height": "100vh", "overflowY": "auto"})
232
 
233
  def chat_box_card():
234
- # Only the chat-window div should be scrollable
235
  return dbc.Card(
236
  dbc.CardBody([
237
- html.Div(
238
- id="chat-window",
239
- style={
240
- "height": "60vh",
241
- "overflowY": "auto",
242
- "overflowX": "auto",
243
- "display": "flex",
244
- "flexDirection": "column",
245
- "justifyContent": "flex-end",
246
- "backgroundColor": "#fff",
247
- "padding": "0.5rem",
248
- "borderRadius": "0.5rem"
249
- }
250
- )
251
  ]),
252
  className="mt-3",
253
  style={
254
  "height": "62vh",
255
- "display": "flex",
256
- "flexDirection": "column"
257
  }
258
  )
259
 
@@ -283,20 +280,13 @@ def user_input_card():
283
  )
284
 
285
  def right_main_static():
286
- # The chat message area gets its own container/card with its own scrollbar
287
  return html.Div([
288
- html.Div(
289
- chat_box_card(),
290
- style={"width": "100%"}
291
- ),
292
- html.Div(
293
- user_input_card(),
294
- style={"width": "100%", "marginTop": "1.5rem"}
295
- ),
296
  dcc.Loading(id="loading", type="default", fullscreen=False, style={"position": "absolute", "top": "5%", "left": "50%"}),
297
  dcc.Interval(id="stream-interval", interval=400, n_intervals=0, disabled=True, max_intervals=1000),
298
  dcc.Store(id="client-question", data="")
299
- ], style={"padding": "1rem", "backgroundColor": "#fff", "height": "100vh", "overflowY": "auto", "display": "flex", "flexDirection": "column", "justifyContent": "flex-start"})
300
 
301
  app.layout = html.Div([
302
  dcc.Store(id="session-id", storage_type="local"),
 
231
  ], style={"padding": "1rem", "backgroundColor": "#f8f9fa", "height": "100vh", "overflowY": "auto"})
232
 
233
  def chat_box_card():
234
+ # Explicit scrollbars and height
235
  return dbc.Card(
236
  dbc.CardBody([
237
+ html.Div(id="chat-window", style={
238
+ "height": "60vh",
239
+ "overflowY": "scroll",
240
+ "overflowX": "auto",
241
+ "display": "flex",
242
+ "flexDirection": "column",
243
+ "justifyContent": "flex-end",
244
+ "backgroundColor": "#fff",
245
+ "padding": "0.5rem",
246
+ "borderRadius": "0.5rem"
247
+ })
 
 
 
248
  ]),
249
  className="mt-3",
250
  style={
251
  "height": "62vh",
252
+ "overflowY": "scroll",
253
+ "overflowX": "auto"
254
  }
255
  )
256
 
 
280
  )
281
 
282
  def right_main_static():
 
283
  return html.Div([
284
+ chat_box_card(),
285
+ user_input_card(),
 
 
 
 
 
 
286
  dcc.Loading(id="loading", type="default", fullscreen=False, style={"position": "absolute", "top": "5%", "left": "50%"}),
287
  dcc.Interval(id="stream-interval", interval=400, n_intervals=0, disabled=True, max_intervals=1000),
288
  dcc.Store(id="client-question", data="")
289
+ ], style={"padding": "1rem", "backgroundColor": "#fff", "height": "100vh", "overflowY": "auto"})
290
 
291
  app.layout = html.Div([
292
  dcc.Store(id="session-id", storage_type="local"),