Skip to main content

MCP Open Client - A NiceGUI-based chat application for Claude

Project description

Drawer Close Button Positioning Solution

This repository contains a comprehensive solution for moving the drawer close button from its default right position to the left side in a NiceGUI application that uses Quasar components.

Files Included

  • settings/app-styles.css: Contains 7 different CSS selector options to move the drawer close button
  • drawer-button-verification.md: Guide for testing and troubleshooting the solution
  • drawer-solution-summary.md: Summary of the approach and explanation of CSS options
  • browser-specific-fixes.css: Additional CSS for browser compatibility
  • custom-drawer-example.py: Alternative Python implementations with custom drawers

Quick Start

  1. Include the CSS from settings/app-styles.css in your NiceGUI application
  2. Test the drawer close button position
  3. If needed, refer to drawer-button-verification.md for troubleshooting

CSS Solution

The primary solution uses CSS to change the justify-content property of the drawer header from flex-end (right-aligned) to flex-start (left-aligned). Multiple selector options are provided to ensure compatibility with different Quasar/NiceGUI versions.

Example:

.q-drawer__content > div:first-child {
  justify-content: flex-start !important;
}

Alternative Approaches

If the CSS solution doesn't work for your specific implementation, alternative approaches are provided:

  1. Custom Drawer Header: Create your own drawer header with a manually positioned close button
  2. JavaScript Solution: Use client-side JavaScript to reposition the button programmatically
  3. CSS Hiding Technique: Hide the default button and add your own in the desired position

Browser Compatibility

The solution includes specific fixes for:

  • Chrome and Chromium-based browsers
  • Firefox
  • Safari
  • Edge/IE Legacy
  • Mobile devices
  • High-density displays

Integration with NiceGUI

The solution is designed to work with NiceGUI's implementation of Quasar's drawer component. It respects the existing drawer functionality while only changing the position of the close button.

Troubleshooting

If you encounter issues:

  1. Check which CSS selector works best for your specific implementation
  2. Use browser developer tools to inspect the drawer structure
  3. Try the alternative approaches provided in custom-drawer-example.py
  4. Refer to drawer-button-verification.md for detailed troubleshooting steps

License

This solution is provided under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_open_client-0.4.3.tar.gz (38.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_open_client-0.4.3-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_open_client-0.4.3.tar.gz.

File metadata

  • Download URL: mcp_open_client-0.4.3.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for mcp_open_client-0.4.3.tar.gz
Algorithm Hash digest
SHA256 223f6fce25dd2eba0ddcb2a1c177d130ba3c10e6d266a394a6c516630f8bdd4b
MD5 34d5358fba727301c84e7afa97c3c3fc
BLAKE2b-256 c312aadbff1b8654938f82a830b8d29ccdf50800e42132e3ea722561d0e2836b

See more details on using hashes here.

File details

Details for the file mcp_open_client-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_open_client-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c1266f3a2eb3326c750a6b2658f6196948ee2f3c5a89056ea640e10a6c9b85f1
MD5 ae02ba5787693720139bc15356a4d451
BLAKE2b-256 7cbf8eb928ffafb5bfb7954ad339b9a7c59bb64efaed200d4fa67c6e5afbe2c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page