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 customizable announcements section #5

Merged
merged 22 commits into from
Dec 17, 2021

Conversation

GeorgianaElena
Copy link
Member

Closes 2i2c-org/infrastructure#877

It makes the sections in purple arrow(support service link) and pink arrow (announcement) customizable by our hubs. This screenshot is from the old UToronto hub.
support

<div class="info text-center">
<br>
<i class="fa fa-info-circle"></i>
Use <a href=" {{ custom.support_service.url }}">{{ custom.support_service_name }}</a> to open tickets for support questions.
Copy link
Member

Choose a reason for hiding this comment

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

Let's just make the entire HTML here customizable? So it's just we can have a list of announcements here. Not everyone has a suppert link...

Choose a reason for hiding this comment

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

Maybe some custom.help.url and custom.help.text?
Even when not everyone has a "support" link, I would bet everyone has some email address people could/should ping if they have some issue/problem, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually thought that we could default to our freshdesk support account? Hmm, but maybe my thinking is not right.
Thinking about it, I believe we concluded to have the hub representative reach out to us and not the regular user

Copy link
Member

Choose a reason for hiding this comment

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

@GeorgianaElena yeah, i think the situation for each hub is different enough that arbitrary HTML here is nice. In the future, we could also perhaps let hub admins set announcements here via the configurator

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe delete this section entirely? (see my comment for the code lines bellow)

Choose a reason for hiding this comment

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

Yep, that is the other option, just go with the ANN section, but I still think it is useful to have a "link place" just below the login button...

templates/login.html Outdated Show resolved Hide resolved
@GeorgianaElena
Copy link
Member Author

GeorgianaElena commented Dec 15, 2021

@yuvipanda and @damianavila, made announcements be a list that we iterate and I finally managed to move the text inside the announcement box slightly to right of the border 🤦 I've deployed this changes on staging and for two announcements it looks like this:

padding

What do you think?

@GeorgianaElena
Copy link
Member Author

Note that I noticed that UToronto had two support links:

  • the one under the login button links to a service called jupyter-help
  • the one in the announcements links to jupyterhub-support

The one under the login button was added first, so maybe in the meantime it became deprecated? not sure though

This matches what most of other parts of Jupyter do infromally
I think
@yuvipanda
Copy link
Member

I made a commit that changes the padding values slightly so they are multiples of 4 - that's what I've generally seen used in the Jupyter ecosystem and elsewhere. Hope that's ok :D

@yuvipanda
Copy link
Member

Also, this will fail if announcements is not set as a key. Can you make it optional?

Copy link
Member

@yuvipanda yuvipanda left a comment

Choose a reason for hiding this comment

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

Also, this will fail if announcements is not set as a key. Can you make it optional?

@damianavila
Copy link

Also, this will fail if announcements is not set as a key. Can you make it optional?

I think you could use something like foo is defined on jinja templates, IIRC...
Looking at the docs: https://jinja.palletsprojects.com/en/3.0.x/templates/#jinja-tests.defined

@GeorgianaElena
Copy link
Member Author

Thanks @yuvipanda and @damianavila! Made it optional :D

@damianavila
Copy link

Thanks @yuvipanda and @damianavila! Made it optional :D

Super! Btw, did you test if this is behaving as expected when there is no an ANN key?

@GeorgianaElena
Copy link
Member Author

Yes! I did a deploy this morning on staging with the changes from my fork and I didn't see any errors in the logs. Also, the homepage didn't look funny or anything. But now I'm doubting a bit, as I was pretty sleepy 😅

Copy link

@damianavila damianavila left a comment

Choose a reason for hiding this comment

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

LGTM

@GeorgianaElena GeorgianaElena changed the title Add customizable announcement and support service link Add customizable announcements section Dec 17, 2021
@GeorgianaElena GeorgianaElena merged commit 48aaa76 into 2i2c-org:master Dec 17, 2021
@GeorgianaElena GeorgianaElena deleted the support branch January 3, 2022 09:15
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.

UToronto hub homepage customization
3 participants