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

feat: use ocis images from same directory level #48

Merged
merged 10 commits into from
Jun 11, 2024

Conversation

saw-jan
Copy link
Member

@saw-jan saw-jan commented Apr 15, 2024

Description

FEAT: able to use images available at the same directory level as the markdown file in the ocis server.

Requirements:

  1. allow to embed images that are stored in the same folder or its subfolders by using the markdown image syntax

same folder - ✔️
subfolders - ❌ (Follow up in next PR)

  1. not allowing to embed files from a folder of higher levels

✔️

  1. require the whole folder be publicly shared if the public viewer should see the images

✔️

  1. if only the markdown file is publicly share the viewer should not be able to access the images

✔️

Test Cases:

  • local images (image from current directory level)
  • large local images
  • multiple small images (if images are large then only one might be visible)
  • uploaded image (upload into markdown)
  • external image url
  • audio/video (doesn't work - not supported by the md parser)

Related Issue

Screenshots (if appropriate):

Owner:

Screenshot from 2024-04-15 12-11-10 Screenshot from 2024-04-15 12-11-04

Folder Link - Viewer:

Screenshot from 2024-04-15 12-13-44 Screenshot from 2024-04-15 12-13-52

MD File link - Editor:

Screenshot from 2024-04-15 12-18-28 Screenshot from 2024-04-15 12-12-26

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Tests only (no source changes)
  • Documentation only (no source changes)
  • Maintenance (e.g. dependency updates or tooling)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation updated

@saw-jan saw-jan added the enhancement New feature or request label Apr 15, 2024
@saw-jan saw-jan self-assigned this Apr 15, 2024
@saw-jan saw-jan force-pushed the feat/load-folder-images branch 2 times, most recently from 87eaf2f to 9cfa6ef Compare April 15, 2024 11:16
@saw-jan saw-jan marked this pull request as ready for review April 15, 2024 11:16
@saw-jan saw-jan mentioned this pull request Apr 15, 2024
6 tasks
src/App.vue Outdated
Comment on lines 144 to 154
// reload the active files
await loadFolderForFileContext(unref(currentFileContext))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need caching. Will do a follow up PR

src/App.vue Outdated Show resolved Hide resolved
src/App.vue Show resolved Hide resolved
@saw-jan
Copy link
Member Author

saw-jan commented May 21, 2024

This PR will be merged to the main branch which will be v2.0.0.
We have released v1.0.0

@grgprarup @S-Panta I have updated the comments. Please re-check if it works

@saw-jan saw-jan changed the title feat: use images from same directory level feat: use ocis images from same directory level May 21, 2024
Copy link
Contributor

@S-Panta S-Panta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried and tested locally. LGTM

@saw-jan saw-jan merged commit c0a7a2b into main Jun 11, 2024
1 check passed
@saw-jan saw-jan deleted the feat/load-folder-images branch June 11, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants