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

Refactor Media Browser #102

Merged
merged 64 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0f4918f
GITBOOK-10: change request with no subject merged in GitBook
mostafaznv Nov 28, 2023
4d3819a
GITBOOK-11: change request with no subject merged in GitBook
mostafaznv Nov 28, 2023
7553b8e
GITBOOK-12: change request with no subject merged in GitBook
mostafaznv Nov 28, 2023
055d3cc
feat: init new media-browser
mostafaznv Dec 4, 2023
192918b
feat: delete assets of media-browser
mostafaznv Dec 4, 2023
e37bcec
fix: change success message of delete assets request
mostafaznv Dec 4, 2023
450bdd7
feat: always display navbar buttons and disable them when there is no…
mostafaznv Dec 5, 2023
3d542c4
fix: check null on setting name in MediaBrowserInfo.vue
mostafaznv Dec 5, 2023
f291dde
feat: decouple rename items from sidebar-info in media-browser
mostafaznv Dec 6, 2023
02ef147
feat: store toggle state of left sidebar in media-browser
mostafaznv Dec 6, 2023
05d253e
feat: upload files
mostafaznv Dec 8, 2023
0c7d4b5
Merge remote-tracking branch 'origin/dev' into dev
mostafaznv Dec 8, 2023
029bba5
chore: pass props to media-browser-list using v-bind
mostafaznv Dec 9, 2023
a9ed72b
fix: set default value of orderBy and orderByDirection using props
mostafaznv Dec 9, 2023
7fa1a5f
chore: replace raw svg icons with their heroicon equivalent
mostafaznv Dec 9, 2023
93ebf84
chore: move overlay to modal component
mostafaznv Dec 9, 2023
152880c
chore: move css styles of navbar btn to field.sass
mostafaznv Dec 9, 2023
bef568f
fix: reduce z-index of media-browser
mostafaznv Dec 9, 2023
c96ef32
ref: move audio-icon to icons folder
mostafaznv Dec 9, 2023
1fb54e6
ref: move shared props to picker-props.js
mostafaznv Dec 9, 2023
b7ff040
fix: prevent @select to fix "commandcollection-command-not-found" cau…
mostafaznv Dec 15, 2023
574d924
fix: prevent closing parent modal when @keyup.esc fires for child modal
mostafaznv Dec 15, 2023
e93576c
ref: remove unused transition wrapper around navbar items
mostafaznv Dec 15, 2023
4da8853
wip
mostafaznv Dec 15, 2023
54de64c
fix: prevent @select in MediaBrowserSearchModal.vue
mostafaznv Dec 15, 2023
68e9325
fix: add ellipsis effect to prevent text overflow in media-info section
mostafaznv Dec 15, 2023
e875af2
ref: replace click-outside.js with vueuse click outside
mostafaznv Dec 15, 2023
bb72cff
ref: make a component to display video icon
mostafaznv Dec 15, 2023
997f82b
feat: use video tag to display buffered frame of video in case video …
mostafaznv Dec 15, 2023
4c77edb
feat: play video/audio/image directly from their items
mostafaznv Dec 15, 2023
1c03068
feat: put an overlay over the media items during fetching items
mostafaznv Dec 15, 2023
e4f192e
feat: make media-browser responsive
mostafaznv Dec 15, 2023
e491e02
fix: hide info section in mobile devices
mostafaznv Dec 15, 2023
5ed417c
feat: pick items and add them to ck content
mostafaznv Dec 15, 2023
f5b290d
feat: pick item @dbclick
mostafaznv Dec 16, 2023
73d17d6
ref: remove defineProps, defineEmits, and defineExpose as they no lon…
mostafaznv Dec 16, 2023
3317a2e
fix: clear selected items on page refresh
mostafaznv Dec 16, 2023
3eeda70
fix: use src when selected item is a gif
mostafaznv Dec 16, 2023
d8af35b
feat: add support for legacy nova video package
mostafaznv Dec 16, 2023
0d881f4
fix: display order items based on returned columns from the api
mostafaznv Dec 16, 2023
caa4bcd
feat: add title to preview button of media items
mostafaznv Dec 16, 2023
3f3178a
feat: support width and height as order items for images and videos
mostafaznv Dec 16, 2023
36dbaa1
fix: display success toast just when some files uploaded successfully
mostafaznv Dec 16, 2023
e2b7cd0
feat: toast better error messages on failed upload processes
mostafaznv Dec 16, 2023
23db408
fix: reset keyword when changing browser type
mostafaznv Dec 16, 2023
6ee50d9
feat: add createdAt/updatedAt fields to image and audio stubs
mostafaznv Dec 16, 2023
eae64f8
fix: reset input files after processing upload requests
mostafaznv Dec 16, 2023
13d704b
fix: use proper keys to catch upload errors
mostafaznv Dec 16, 2023
d2be637
feat: implement new UI for snippet browser
mostafaznv Dec 17, 2023
bc7af9c
fix: detach ck events on unmount hook
mostafaznv Dec 17, 2023
1ab362d
feat: add empty-state to media list
mostafaznv Dec 17, 2023
dfad944
fix: fetch src and cover from legacy nova-video responses
mostafaznv Dec 17, 2023
f502791
chore: replace image/video/audio browser with mediaBrowser inside nov…
mostafaznv Dec 17, 2023
949814a
chores: code cleanup
mostafaznv Dec 17, 2023
7bc0e73
chores: remove v-lazy-image from package.json
mostafaznv Dec 17, 2023
c500035
ref: move fields components to fields folder
mostafaznv Dec 17, 2023
dac8910
feat: show/hide image, video, and audio sections of media browser usi…
mostafaznv Dec 17, 2023
a115ea1
fix: calculate totalPages in a proper way
mostafaznv Dec 18, 2023
be53cc4
fix: set cursor for pagination buttons
mostafaznv Dec 18, 2023
ba0ae33
feat: improve rtl support
mostafaznv Dec 18, 2023
307baee
ref: replace axios with Nova.request()
mostafaznv Dec 18, 2023
d156c86
Update Assets
mostafaznv Dec 18, 2023
1e36d5c
feat: close modal by clicking on modal backdrop
mostafaznv Dec 18, 2023
8c1b8f5
Update Assets
mostafaznv Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions config/nova-ckeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@
'fontBackgroundColor',
'|',
'insertTable',
'imageBrowser',
'videoBrowser',
'audioBrowser',
'mediaBrowser',
'mediaEmbed',
'link',
'resizeImage',
Expand Down Expand Up @@ -447,7 +445,7 @@
],

'toolbar' => [
'imageBrowser',
'mediaBrowser',
'|',
'imageStyle:full',
'imageStyle:alignLeft',
Expand Down
2 changes: 1 addition & 1 deletion dist/css/field.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/field.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Introduction

[![GitHub license](https://img.shields.io/github/license/mostafaznv/nova-ckeditor?style=flat-square)](https://github.com/mostafaznv/nova-ckeditor/blob/master/LICENSE) [![Packagist Downloads](https://img.shields.io/packagist/dt/mostafaznv/nova-ckeditor?style=flat-square)](https://packagist.org/packages/mostafaznv/nova-ckeditor) [![Latest Version on Packagist](https://img.shields.io/packagist/v/mostafaznv/nova-ckeditor.svg?style=flat-square)](https://packagist.org/packages/mostafaznv/nova-ckeditor)
[<img src="https://img.shields.io/github/license/mostafaznv/nova-ckeditor?style=flat-square" alt="GitHub license" data-size="line">](https://github.com/mostafaznv/nova-ckeditor/blob/master/LICENSE) [<img src="https://img.shields.io/packagist/dt/mostafaznv/nova-ckeditor?style=flat-square" alt="Packagist Downloads" data-size="line">](https://packagist.org/packages/mostafaznv/nova-ckeditor) [<img src="https://img.shields.io/packagist/v/mostafaznv/nova-ckeditor.svg?style=flat-square" alt="Latest Version on Packagist" data-size="line">](https://packagist.org/packages/mostafaznv/nova-ckeditor)



The **Nova Ckeditor** package combines the power of Laravel Nova with the advanced features of **CKEditor 5**, a modern and versatile text editor. It aims to bring CKEditor 5 integration to Laravel Nova, providing you with an enhanced content creation experience within your Laravel applications.\
With "Nova Ckeditor," you can seamlessly integrate CKEditor 5 into Laravel Nova and unlock advanced text editing capabilities within your Laravel applications. Whether you're building a blog, a content management system, or any other application that requires rich text editing, "Nova Ckeditor" provides the tools and features you need for a seamless content creation experience.

[![Donate](https://mostafaznv.github.io/donate/donate.svg)](https://mostafaznv.github.io/donate)
<div align="left">

<figure><img src="https://mostafaznv.github.io/donate/donate.svg" alt="" width="188"><figcaption></figcaption></figure>

</div>



Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@
"sass": "^1.63.6",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.3",
"v-lazy-image": "^2.1.1",
"vue-loader": "^17.2.2",
"vue-template-compiler": "^2.7.14",
"webpack": "^5.88.0"
},
"dependencies": {
"@vueuse/components": "^10.7.0",
"@vueuse/core": "^10.7.0",
"lodash": "^4.17.21",
"postcss-scss": "^4.0.6",
"regex-parser": "^2.2.11",
Expand Down
8 changes: 2 additions & 6 deletions resources/js/ckeditor/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
import {SimpleUploadAdapter} from '@ckeditor/ckeditor5-upload'

// Browser
import ImageBrowser from './plugins/ImageBrowser'
import VideoBrowser from './plugins/VideoBrowser'
import AudioBrowser from './plugins/AudioBrowser'
import MediaBrowser from './plugins/MediaBrowser'
import SnippetBrowser from './plugins/SnippetBrowser'

// Video
Expand Down Expand Up @@ -95,9 +93,7 @@ export default class CkEditor extends ClassicEditorBase {
// Add Plugins
static get builtinPlugins() {
return [
ImageBrowser,
VideoBrowser,
AudioBrowser,
MediaBrowser,
SnippetBrowser,
Video,
Audio,
Expand Down
7 changes: 0 additions & 7 deletions resources/js/ckeditor/plugins/AudioBrowser.js

This file was deleted.

7 changes: 0 additions & 7 deletions resources/js/ckeditor/plugins/ImageBrowser.js

This file was deleted.

Loading