LJW21-02 opened a new pull request, #1033:
URL: https://github.com/apache/iotdb-docs/pull/1033

   This pull request adds a new feature to improve the usability of SQL code 
blocks in the documentation by introducing a "Convert to Single Line" button. 
This button allows users to quickly transform multi-line SQL code into a 
single-line format for easier copying and pasting. Supporting styles and logic 
have also been added to ensure a smooth user experience.
   
   **Feature: Convert SQL code blocks to single line**
   
   * Added a function in `src/.vuepress/client.ts` that injects a "Convert to 
Single Line" button into SQL code blocks. The button transforms multi-line SQL 
code into a single line, updates the display, and provides visual feedback upon 
conversion.
   * The button and tooltip are initialized on page mount and after each route 
change to ensure they appear for dynamically loaded content.
   
   **Styling and UI enhancements**
   
   * Introduced `.copy-one-line-btn` and `.copy-one-line-tooltip` classes in 
`src/.vuepress/styles/index.scss` to style the new button and tooltip, 
including positioning, opacity transitions, and hover effects for improved 
usability.
   * Ensured the button only appears when hovering over SQL code blocks and 
provides clear feedback when used.
   
   **Technical updates**
   
   * Imported `onMounted` and `nextTick` from `vue` in 
`src/.vuepress/client.ts` to handle dynamic DOM updates for the new feature.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to