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

add rich UI to display inserted resources in CKEditor #454

Closed
4 tasks done
Tracked by #451
alicewriteswrongs opened this issue Aug 2, 2021 · 9 comments
Closed
4 tasks done
Tracked by #451

add rich UI to display inserted resources in CKEditor #454

alicewriteswrongs opened this issue Aug 2, 2021 · 9 comments
Assignees

Comments

@pdpinch
Copy link
Member

pdpinch commented Aug 3, 2021

Feel free to split this into separate issues, for images, documents and video, if it makes sense.

@pdpinch
Copy link
Member

pdpinch commented Aug 3, 2021

... also website collections.

@alicewriteswrongs
Copy link
Contributor Author

for collections we have this issue as well: #317

@alicewriteswrongs alicewriteswrongs self-assigned this Aug 3, 2021
@alicewriteswrongs alicewriteswrongs changed the title add rich UI for display inserted resources in CKEditor add rich UI to display inserted resources in CKEditor Aug 10, 2021
@alicewriteswrongs
Copy link
Contributor Author

alicewriteswrongs commented Aug 10, 2021

@pdpinch @Ferdi so there's a slight complication to our plans here which I think is probably worth discussing before we continue. It relates to the comment that @gumaerc made here: #475 (comment)

Basically, right now we have built a lot of these features out in a totally configurable way, so that, for instance, the UI doesn't expect that a site always has a 'page' or 'resource' content type. When selecting resources to embed via the UI I added in #475, there is actually configuration under the hood, on the Markdown widget, which tells it to fetch site content records of a given type and to display them for embedding there.

The problem we run into is that since this is a configurable feature we can't really assume that these records have particular fields, for instance file_type, since these fields are set in the site configuration and could be anything.

Anyhow, this was raised on the embed UI pr (#475) because there was a question of whether we want to include some UI which would provide more context to the user about the different resources (aka site content records) that they are seeing in the picker. Adding such a piece of UI, for instance switching on the file_type field to show a little icon for pdf, image, etc, depends on us either:

  1. adding configuration where we state, in the site configuration, what field should be access to enrich the resource display or
  2. writing some UI that assumes a given field is there on the site content type we want to embed (i.e. assuming that file_type is set on these objects). this could be hard-coded, or something which tests for this field's presence and falls back to not displaying anything if not present.

Anyhow, I think this is a question about how much the implementation of this resource embed feature should be coupled with out standard course configuration, and how much it should be a more general, configurable feature. Wondering your thoughts on this and what direction we should take.

@pdpinch
Copy link
Member

pdpinch commented Aug 10, 2021 via email

@alicewriteswrongs
Copy link
Contributor Author

Definitely - I think something that tries for the field and then doesn't render anything if it's not present is probably the simplest option, so if that sounds alright to you then that's good by me!

alicewriteswrongs added a commit that referenced this issue Sep 1, 2021
This adds a basic display for Image resources, which shows a sort of
thumbnail of the image and a few pieces of info about it.

closes #504
part of #454
@alicewriteswrongs
Copy link
Contributor Author

@pdpinch @Ferdi am I correct in thinking we discussed not having an embed for PDFs and the like?

@pdpinch
Copy link
Member

pdpinch commented Sep 7, 2021 via email

@alicewriteswrongs
Copy link
Contributor Author

ok cool, I'm going to go ahead and close then since we've implemented initial support for video and images already

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

No branches or pull requests

2 participants