Skip to content

Make UI styling consistent between libraries and courses tabs when empty (SOL-232) - #7059

Merged
antoviaque merged 1 commit into
openedx:masterfrom
open-craft:library-comments
Feb 26, 2015
Merged

Make UI styling consistent between libraries and courses tabs when empty (SOL-232)#7059
antoviaque merged 1 commit into
openedx:masterfrom
open-craft:library-comments

Conversation

@Kelketek

Copy link
Copy Markdown
Contributor

Background: Makes the empty library listing look consistent with the empty course listing.

Empty course listing:

courses

Empty library listing:

libraries

How it used to look:

oldlibraries

Jira ticket number: https://openedx.atlassian.net/browse/SOL-232
Partner information: 3rd party-hosted open edX instance, for an edX solutions client.
Sandbox: http://sandbox4.opencraft.com:18010/

@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @Kelketek! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request.

To automatically create an OSPR issue for this pull request, just visit this link: http://openedx-webhooks.herokuapp.com/github/process_pr?repo=edx%2Fedx-platform&number=7059

@Kelketek

Copy link
Copy Markdown
Contributor Author

@cahrens This PR is intended to also have a resolution for SOL-227 as well. However, I'm a bit confused on what is required. The error message for Libraries is different from the one displayed, and is tailored for it. Libraries also don't have 'course numbers' as in your original comment, and I don't see an error message mentioning libraries and course numbers. Perhaps the issue was resolved elsewhere? Or do I misunderstand?

@cahrens

cahrens commented Feb 20, 2015

Copy link
Copy Markdown

@Kelketek The issue I raised is that libraries and courses existing within the same namespace. So I couldn't create the new course with org "foo" and course number "bar" because of the already existing library.

It was a bit confusing to me because the error message I got only referred to courses, and yet the conflict was actually with a library.

https://github.com/edx/edx-platform/pull/6459#issuecomment-69827517

Comment thread cms/templates/index.html Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You're calling .format() on a string with no {studio_name} placeholder.

@bradenmacdonald

Copy link
Copy Markdown
Contributor

Minor issue I just pointed out, and it doesn't yet address SOL-227. Otherwise looks good.

BTW This comment may be a little late, but I think it would be awesome to add some copy here that explains what a library is, which is non-obvious. i.e. Add "Content libraries hold problems and content that can be easily re-used across multiple courses." or something like that.

@Kelketek

Copy link
Copy Markdown
Contributor Author

@cahrens I have attempted to reproduce the issue you mentioned, and at first it appeared I had done so. However, upon further examination I discovered I used the same code and organization as a course I had already created out of habit, and didn't notice that because I was looking at the library listing instead of the course listing.

When I created a library with an organization and code I don't normally use and then attempt to create a course with those items, it works just fine. Therefore I'm not able to reproduce the issue.

@bradenmacdonald

Copy link
Copy Markdown
Contributor

👍

@Kelketek Kelketek changed the title (WIP) Make UI styling consistent between libraries and courses tabs when empty Make UI styling consistent between libraries and courses tabs when empty Feb 20, 2015
@Kelketek

Copy link
Copy Markdown
Contributor Author

@cahrens @catong This is ready for review.

@cahrens

cahrens commented Feb 23, 2015

Copy link
Copy Markdown

👍 assuming @catong is good with the wording.

@Kelketek perhaps I made the same mistake and actually did have a course with the same code and org. Thanks for trying to reproduce it.

Comment thread cms/templates/index.html

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@marcotuts @antoviaque @Kelketek Can you please clarify the workflow/use case here? I find it a bit strange that a user would end up at the empty library page and see BOTH the "request access from a library creator or admin" AND the "Create your First Library" messages. If a user does NOT have course author (= library creator) privileges, will they still see the "Create your First Library" button enabled? And if a user does have course author and library creator privileges then it seems confusing to present them with the first message.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The first message is prefixed with the title 'Expecting to see a library already here?' It's to inform users of the case when they may be in Studio and expect to be able to edit a library, only to find out there isn't one. This is the same behavior that happens for courses.

The permissions check has not changed between this and the previous version-- @bradenmacdonald is there a permission type we should be checking for? I got the impression by the code that 'anyone can create a library', which may not be what we actually want, but if this is the case, the fix for it is probably outside the scope of this task.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @Kelketek I had to check back in documentation for the main feature, to verify our position when we released the original MVP. In the documentation, we have: "In Studio, if you have course creation privileges, you can create a content library..." My understanding is that not all Studio users have permissions to create content libraries. Some might be course team members without course authoring privileges, and also shouldn't have library creation privileges, in which case the "Create First Library" button should ideally be hidden or disabled. @marcotuts your thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't believe we have different course creation privileges and library creation privileges, we just have creation privileges. @catong I can follow up in person in case I've missed anything, but I think the message is ok to have in either the library or course context, as authors may be expecting one or both of those to be possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@marcotuts Does this mean I should be checking for course authoring privileges when displaying the create button?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @marcotuts Perhaps I'm still missing the point. My original question was about whether a library user should see BOTH of these things:

  1. a message that says, "Expecting a library here?" You need to ask someone to add you to their library access.
  2. an active "Create a library" button.

Are you saying that yes, both cases can apply simultaneously, because a course team member who is able to create their own library might not have access privileges to library that someone else created?
Edited: Hmmmm... I might have just explained this to myself. I think I completely misunderstood the situation on first seeing the screenshots.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, wait... @marcotuts I think I still have an outstanding question. Per what we documented for the MVP and further to @Kelketek's question above, is my understanding correct that only users with course creation privileges also have library creation privileges? If yes, then there might be Studio users who do NOT have library creation privileges, in which case my question is still valid -- in the case of these users, I don't think they should see an active "Create a new library" button.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, there is a single "creator" privilege that affects the ability to create courses and libraries.

If you look above in this file, you can see the button in the top right checks for if course_creator_status=='granted': before showing the "Create Library" button. The same check should be added to the new button.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@bradenmacdonald thanks for shedding light!

@antoviaque antoviaque changed the title Make UI styling consistent between libraries and courses tabs when empty Make UI styling consistent between libraries and courses tabs when empty (SOL-232) Feb 24, 2015
Comment thread cms/templates/index.html Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested wording: "Were you expecting to see a particular library here?"

@Kelketek

Copy link
Copy Markdown
Contributor Author

@catong I've addressed the notes you've written. But were you wanting me to update the course text as well?

@catong

catong commented Feb 24, 2015

Copy link
Copy Markdown
Contributor

@Kelketek At this point I'm not sure whether these templates are the different or same/parameterized so it might be safer :-) for you to do this, if you wouldn't mind. If you would rather not, that's totally OK too, I'll create a backlog story to take care of it.
If you are OK with taking care of it, the suggested text for course template is:
"The course creator must give you access to the course. Contact the course creator or administrator for the course you are helping to author." The existing title for that message is fine.
Thanks very much!

@Kelketek

Copy link
Copy Markdown
Contributor Author

@catong No problem :) If the other changes look good, I'll go ahead and rebase as well on this next push, then, and we should be good to go once the tests come back green.

@catong

catong commented Feb 24, 2015

Copy link
Copy Markdown
Contributor

Awesome. Thanks!

@Kelketek

Copy link
Copy Markdown
Contributor Author

Jenkins seems to be hanging. @jzoldak , any idea what's up here? Is it safe to start a new test?

@jzoldak

jzoldak commented Feb 25, 2015

Copy link
Copy Markdown
Contributor

@Kelketek AWS east was down and thus our jenkins infrastructure couldn't start up new workers. The situation has since been resolved.

@Kelketek

Copy link
Copy Markdown
Contributor Author

test this please

@Kelketek

Copy link
Copy Markdown
Contributor Author

@jzoldak Thanks for the heads up!

@Kelketek

Copy link
Copy Markdown
Contributor Author

test this please

@Kelketek

Copy link
Copy Markdown
Contributor Author

@catong @cahrens @marcotuts Tests are green!

@antoviaque

Copy link
Copy Markdown
Contributor

@Kelketek Congrats : )

@catong Are you good with the PR now? If so I'll merge it.

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.

9 participants