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

Image support #2692

Open
raineorshine opened this issue Dec 9, 2024 · 1 comment
Open

Image support #2692

raineorshine opened this issue Dec 9, 2024 · 1 comment
Labels
feature New feature or request

Comments

@raineorshine
Copy link
Contributor

raineorshine commented Dec 9, 2024

  • Drag-and-drop image
    • Upload to AWS
  • Paste image
  • Do not render URL
    • Do we need a new property on the Thought so that we don't have to wait for the =img child to load?
  • Cursor support
  • Caret support
    • Blur when cursor is no the image
    • Restore browser selection when the cursor moves away (like Divider)

Steps to Reproduce

- a
  - b
  - c
  - https://file.em.space/f/f/fd30f7c5-88ad-48cb-9499-fca6112ca02a.webp
    - =img
  - d

Current Behavior

Screenshot 2024-12-09 at 11 22 30 AM

Expected Behavior

When cursor is null:
Screenshot 2024-12-09 at 11 15 58 AM

When cursor is on the image:
image-with-cursor

Initial width/height:

Question: Should we embed width and height in Thought to avoid having to wait for descendants to load? Or does that go against idiomatic meta attribute usage?

    - =img
      - width
        - 200
      - height
        - 300
@raineorshine raineorshine added the feature New feature or request label Dec 9, 2024
@RED-ROSE515
Copy link
Collaborator

In performance side, I think you need to consider these things.

  • Embedding dimensions in metadata/thought would allow immediate space allocation.
  • Prevents layout shifts during loading.
  • Reduces descendant wait time.
  • Aligns with modern best practices for performance optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants