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

Media Management #180

Merged
merged 15 commits into from
Sep 26, 2016
Merged

Media Management #180

merged 15 commits into from
Sep 26, 2016

Conversation

talvbansal
Copy link
Contributor

Replaced file management with talvbansal/media-manager which should resolve issue #19

However there is one change that may impact some users.

The media manager will look in /storage/app/public folder as its root folder, and a link should be created from here to to public/storage using the php artisan storage:link command (see here for more )[https://laravel.com/docs/5.3/filesystem#the-public-disk].

The consequence of this is that in Canvas none of the existing images will work.
To fix this the following steps should be taken:

  • Move existing content from the public/uploads folder to the storage/app/public folder.
  • Run php artisan migrate (I've created a migration to prefix $post->page_image with /storage/ where necessary and a rollback to undo the change)

Hope you like it!

@talvbansal
Copy link
Contributor Author

I've got no idea how to fix that Version Eye check, as far as I can tell I've set it in my composer.json file and have LICENSE file in my project root :(

@austintoddj
Copy link
Owner

No worries @talvbansal, VersionEye is seeing no license in @erikgall eloquent/phpunit package either. It's not a breaking thing. All the dependencies should still be up to date, I'll still be able to merge without that passing.

@austintoddj
Copy link
Owner

Can't wait to check this out! Just gotta make sure I write some sort of upgrade path now for those who already are using Canvas, but it looks like you detailed it out pretty well.

@talvbansal
Copy link
Contributor Author

Awesome! I cant wait to hear what you think!

@erikgall
Copy link
Contributor

erikgall commented Sep 22, 2016

@austintoddj @talvbansal I added a license to the package's composer.json and it was tagged in the most recent release but VersionEye keeps checking v1.0.5.. I'm not sure why it hasn't updated on their end yet..

Update: It looks like they finally did. It just took a little bit.

@austintoddj
Copy link
Owner

austintoddj commented Sep 22, 2016

@talvbansal Looking at the PR right now. If you go to the admin/posts page, does it go through? My app keeps hanging. Media page looks slick though, just looking at the integration with posts, wanted to know if you had any errors traversing the rest of the app.

UPDATE: Nevermind on that last comment. Local problem with Valet. Still going through the PR now. Some UI tweaks here and there that I'll want to apply, but it's looking nice. If I put together a 'fix-list', would that be a good way to make a few last changes before we pull the trigger?

@talvbansal
Copy link
Contributor Author

Sure thing, can't wait to see the fix list 😀

@austintoddj
Copy link
Owner

Ok, first off, I want to thank you @talvbansal, this is an AWESOME feature! Really enjoyed going through this, and I think it makes Canvas so much better than it was before. The changes I listed below aren't anything major, they mainly detail how this can fit in the current UI/UX a little better. Let me know your thoughts and how feasible they are, or if they are unclear in any way. Again, thanks for making this PR, can't wait to merge it in.

Post Page /admin/post/create /admin/post/edit

  • For the Page Image input, could we have a button next to the input that says Select Image that would open up the Media Library popup, but then also allow the actual input to be clicked on, and you could remove the path if you didn't want an image anymore? Right now if you choose an image, you can't go back to having no image.
  • Change icons to ZMDI icons so it matches the rest of the site

General Tweaks on the Media Library

  • Have a Confirm? message for deleting files/folders so someone can't accidentally delete one without thinking.
  • Rename item: The New name input needs to have the material blue underline on focus like the other inputs on the site
  • New Folder: The Folder name input needs to have the material blue underline on focus like the other inputs on the site
  • Add a space between the words and the icons on all the buttons, looks like it's just a little too tight
  • Change highlight color to be like the blue primary on the site, or something just a little more consistent with the site than the current yellow
  • All notifications, success/error should be the inverse black consistent with the rest of the site
  • Could we remove the black circular preloader altogether? I don't think it fits with the rest of the site, and I think just the clean white on Refresh or loading might look better.
  • On the image preview and details section on the right-hand side of the library, could we change DATE to Uploaded on
  • On the image preview and details section on the right-hand side of the library, could we change PUBLIC URL to URL, and instead of having the Click Here to open in the image in another tab, just have the actual image path?

@talvbansal
Copy link
Contributor Author

talvbansal commented Sep 26, 2016

Thanks for checking it out and for all of your feedback! I've made all of your recommended changes with the exception of the following:

  • Change icons to ZMDI icons so it matches the rest of the site
  • Could we remove the black circular preloader altogether? I don't think it fits with the rest of the site, and I think just the clean white on Refresh or loading might look better.

As the media manager is supposed to be used in other projects (I am in a few work projects already) I need to keep it portable and so need to bundle the icons with it, I'd be happy to change the icons provided that they were SVG's and not font icons. Listen to this for an overview on why SVG's are better.

I think its important to have some visual feedback for potentially long running operations like refreshing the file list or uploading so I've decided to keep the loading icon, however it was too big before so I've reduced it in size and styled it to match Canvas's primary colour as well as adding the text "Loading..." after it.

Take a look and once we're done with this I'll make the change for scroll to top mentioned in #179 - just didn't want to put two features into this PR

@austintoddj
Copy link
Owner

Awesome, thanks @talvbansal! I'll look at this today and we'll keep this moving.

@austintoddj
Copy link
Owner

@talvbansal Just looked it over, and am super happy with the way this turned out. Last fix:

Looks like the modal that the media manager uses clashes just a bit with the other modals on the site, hopefully this wouldn't make it unusable for your other projects if you made the Media Manager modals look a bit more like the rest on Canvas. Here is a screen shot of your modal:

screen shot 2016-09-26 at 6 49 01 am

And here is one of Canvas' modals:

screen shot 2016-09-26 at 6 50 26 am

So it looks like the padding/size might need to be addressed to give it some breathing room, the buttons, the


element, and icons on the delete button. Maybe more, but that's what I could see right away. Would you be able to make it a little more closely aligned with the others?

If so, then that should be the last fix before I merge this in 👍

@talvbansal
Copy link
Contributor Author

talvbansal commented Sep 26, 2016

Yep totally fine with doing that, I'll take a look at it now

@talvbansal
Copy link
Contributor Author

Take a look now, they should match the existing modal windows :)

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

3 participants