Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bugfix and update Preview.tsx #1420

Closed
wants to merge 1,371 commits into from

Conversation

Stijnus
Copy link
Collaborator

@Stijnus Stijnus commented Mar 2, 2025

Fix for : #1097

Device Frame Feature Implementation

Key Features Added

  1. Device Frames for Mobile and Tablet Previews

    • Added visual frames for iPhone and iPad devices
    • Implemented both portrait and landscape orientations
    • Created realistic device bezels with notches and home buttons
  2. Device Options Panel

    • Added toggle for showing/hiding device frames
    • Added toggle for landscape/portrait orientation
    • Updated device size information display
  3. External Window Preview Enhancements

    • Fixed "about:blank" issue with external previews
    • Implemented reliable window creation with proper dimensions
    • Added device name and orientation labels

Technical Implementation Details

  1. Frame Rendering Approach

    • Created a complete HTML document with styling for device frames
    • Used document.write() to inject content into new window
    • Implemented proper iframe loading within the device frame
  2. Responsive Design

    • Dynamic adjustment of frame elements based on device type
    • Proper handling of orientation changes (landscape/portrait)
    • Appropriate sizing for different device types (mobile vs tablet)
  3. Security and Reliability

    • Avoided cross-origin manipulation issues
    • Implemented error handling for window creation
    • Maintained proper sandbox attributes for security

UI/UX Improvements

  1. Visual Enhancements

    • Added realistic device styling (rounded corners, notches, buttons)
    • Implemented proper shadows and depth for 3D appearance
    • Created clean, minimal interface for device controls
  2. User Controls

    • Intuitive toggles for device frame and orientation
    • Clear labeling of device dimensions and frame status
    • Maintained existing preview functionality while adding new features

Code Quality

  1. Maintainability

    • Used TypeScript interfaces for proper typing
    • Implemented clean separation of concerns
    • Added appropriate comments for complex sections
  2. Performance

    • Optimized rendering approach to avoid unnecessary reflows
    • Used efficient DOM manipulation techniques
    • Maintained responsive performance across different device sizes

thecodacus and others added 30 commits December 31, 2024 19:22

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…tz-labs#954)

* fix: better model loading feedback and model list update

* added load on providersettings  update
…tz-labs#895)

* fix: updated logger and model caching

* usage token stream issue fix

* minor changes

* updated starter template change to fix the app title

* starter template bigfix

* fixed hydretion errors and raw logs

* removed raw log

* made auto select template false by default

* more cleaner logs and updated logic to call dynamicModels only if not found in static models

* updated starter template instructions

* browser console log improved for firefox

* provider icons fix icons
…release (stackblitz-labs#959)

* fix: hotfix starter template fix, updated header link to use navigate

* template auth fix

* updated changelog script
Changed updated Hyperbolic Settings link
… isometric git cors proxy (stackblitz-labs#924)

* Exploration of improving git import

* Fix our own git proxy

* Clean out file counting for progress, does not seem to work well anyways
* cookie fix

* fix: git private clone with custom proxy

* list -fix
* commit

* Create .env.example

* Update docker-compose.yaml

---------

Co-authored-by: Anirban Kar <[email protected]>
* Create docker.yaml

* Add build target

* Use build target var

* Use github token instead
* Update docker.yaml

* Fix indentation in docker workflow file
…model integration with AWS Bedrock (stackblitz-labs#974)

* feat: Integrate AWS Bedrock with Claude 3.5 Sonnet, Claude 3 Sonnet, and Claude 3.5 Haiku

* update Dockerfile for AWS Bedrock configuration

* feat: add new Bedrock model 'Mistral' and update Haiku to version 3

* feat: add new bedrock model Nova Lite and Nova Pro

* Update README documentation to reflect the latest changes

* Add the icon for aws bedrock

* add support for serialized AWS Bedrock configuration in api key
…itz-labs#1008)

* fix: ollama and lm studio url issue fix for docker and build

* vite config fix
* fix: streaming issue fixed for build versions

* added keep-alive header
Added ⬜ Granite Integration
)

* feat: enhance chat import with multi-format support

- Add support for importing chats from different formats:
  - Standard Bolt format
  - Chrome extension format
  - History array format
  - Bolt export format
- Add Import Chats button to Data Management
- Add proper error handling and logging
- Update README with backup/restore feature

* refactor: simplify chat import formats

- Remove multi-format support from DataTab
- Keep only standard Bolt export formats
- Simplify ImportButtons to handle standard format only
@emilio-balda
Copy link

Hey @Stijnus I was trying out this pull request and was not able to resize anymore. Here is a loom:
https://www.loom.com/share/009a6afea60b4a8bbd29e47d35bcbe94?sid=220c1fb9-0d3f-47fc-81bd-67ff1fe1e8f1

@Stijnus
Copy link
Collaborator Author

Stijnus commented Mar 14, 2025

Hey, @emilio-balda thank you for the feedback i will check it out this weekend and let you know when its ready for testing.

Stijnus added 3 commits March 17, 2025 14:09
Fixed preview functionality while maintaining resize capability:
- Removed `e.preventDefault()` calls in pointer event handlers that were blocking normal event flow
- Improved pointer capture release logic with proper element detection
- Added safety checks to prevent errors when releasing pointer captures
@Stijnus
Copy link
Collaborator Author

Stijnus commented Mar 21, 2025

Hey @emilio-balda i have updated the PR could you check once more?

Thx

Stijnus and others added 19 commits March 26, 2025 00:51
1. **Device Frames for Mobile and Tablet Previews**
   - Added visual frames for iPhone and iPad devices
   - Implemented both portrait and landscape orientations
   - Created realistic device bezels with notches and home buttons

2. **Device Options Panel**
   - Added toggle for showing/hiding device frames
   - Added toggle for landscape/portrait orientation
   - Updated device size information display

3. **External Window Preview Enhancements**
   - Fixed "about:blank" issue with external previews
   - Implemented reliable window creation with proper dimensions
   - Added device name and orientation labels

1. **Frame Rendering Approach**
   - Created a complete HTML document with styling for device frames
   - Used document.write() to inject content into new window
   - Implemented proper iframe loading within the device frame

2. **Responsive Design**
   - Dynamic adjustment of frame elements based on device type
   - Proper handling of orientation changes (landscape/portrait)
   - Appropriate sizing for different device types (mobile vs tablet)

3. **Security and Reliability**
   - Avoided cross-origin manipulation issues
   - Implemented error handling for window creation
   - Maintained proper sandbox attributes for security

1. **Visual Enhancements**
   - Added realistic device styling (rounded corners, notches, buttons)
   - Implemented proper shadows and depth for 3D appearance
   - Created clean, minimal interface for device controls

2. **User Controls**
   - Intuitive toggles for device frame and orientation
   - Clear labeling of device dimensions and frame status
   - Maintained existing preview functionality while adding new features

1. **Maintainability**
   - Used TypeScript interfaces for proper typing
   - Implemented clean separation of concerns
   - Added appropriate comments for complex sections

2. **Performance**
   - Optimized rendering approach to avoid unnecessary reflows
   - Used efficient DOM manipulation techniques
   - Maintained responsive performance across different device sizes
Fixed preview functionality while maintaining resize capability:
- Removed `e.preventDefault()` calls in pointer event handlers that were blocking normal event flow
- Improved pointer capture release logic with proper element detection
- Added safety checks to prevent errors when releasing pointer captures
- Drag and drop images directly in the file tree. Image will convert to base64 format
removed rename files until a better solution is found and made file/folder create/delete be persistent across reloads
Add support for Supabase database operations, including migrations and queries. Implement new Supabase-related types, actions, and components to handle database interactions. Enhance the prompt system to include Supabase-specific instructions and constraints. Ensure data integrity and security by enforcing row-level security and proper migration practices.
This commit introduces the ability to fetch and store Supabase API keys and URL credentials when a project is selected. This enables the application to dynamically configure the Supabase connection environment variables, improving the integration with Supabase services. The changes include updates to the Supabase connection logic, new API endpoints, and modifications to the chat and prompt components to utilize the new credentials.
Include detailed guidelines for handling database operations using Supabase, covering setup, migrations, security, and best practices. This ensures consistent and secure database interactions in projects.
…ction

Remove console.log statement for debugging purposes in the API route and enhance the layout of buttons in the SupabaseConnection component by grouping them and adding a refresh button
@Stijnus Stijnus force-pushed the ACT_BoltDYI_BUGFIX_PREVIEW branch from 3bd6be7 to f8f2edc Compare March 28, 2025 13:26
@Stijnus Stijnus closed this Mar 28, 2025
@Stijnus Stijnus deleted the ACT_BoltDYI_BUGFIX_PREVIEW branch March 28, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet