New "Banner Topic" pin type

spec
rfc

(Jeff Atwood) #12

OK this is now deployed and you can see it live on http://discourse.soylent.me

Use the admin wrench on a topic to make a topic a banner topic.


Help with custom javascript for manual banner ads
Dismissable text / image banner (new customer "experience")
Dismissable text / image banner (new customer "experience")
(Michael Downey) #13

We put this up on https://talk.openmrs.org/ earlier when it came out, but what’s the best way to do that colored background and rounded corners? CSS customization in the admin settings?


(Jeff Atwood) #14

Get latest code is the easiest way… it has default styling now.


(Michael Downey) #15

Cool, much nicer now.


(ampburner) #16

@codinghorror does this also include images in the topic? Do they automatically get added to the banner?


(Jeff Atwood) #17

@ampburner yes you can use images, they will appear.

One thing I missed @zogstrip, right now the banner only shows up at the top of the page. We also need to overlay the banner in the case that users deep link to a post inside a topic, like so:

Because when you arrive through a deep link URL, that’s when you need a “what the hell is this place” introduction the most!


Banner Topic - controlling how much or what text is shown?
(Régis Hanol) #18

This is now implemented :dolphin:

https://github.com/discourse/discourse/commit/4878d88cbd9f31d059242028a583e44aa1075534


(Michael Downey) #19

This looks pretty good, but was the intention to have a margin above like this? :fishing_pole_and_fish: :dolphin:


(Régis Hanol) #20

Nope. That’s due to your custom header.


(Anton) #21

Is this planned? I would very much use category based banners.


(Rahul Dhingra) #22

@meglio you can use categories background images as banner:


Hero Image feature?
(Anton) #23

But then users wouldn’t be able to close such a banner, would they?


(Rahul Dhingra) #24

@meglio nope they are kinda Billboards. you can’t dismiss them.


(Anton) #25

Then it doesn’t solve my issue )


(Daniel Hollands) #30

Cool, thank you… I hope you don’t mind, but I have one more tiny bit of feedback.

On a topic page, if you’re at the top of the page, the banner shows happily enough on a clear background, like so:

But as soon as you scroll even 1 pixel down the page, everything suddenly jumps up and the top of the post gets hidden behind the banner:

I know that this is a nit-pick, and that most people are never going to notice this (as I think most would just dismiss the banner once they’ve read it), but I noticed it, and I think others would too. So if instead of a sudden jump, as the banner goes from position: relative to fixed, I was thinking it might be good to keep an artificial margin at the top of the page, the same height as the banner, and have that be dismissed when the banner is dismissed?

Just an idea :smile:


(Régis Hanol) #31

I agree but this is complicated. If you can find a way that supports both topic and topic list pages, as well as custom header, I’ll be more than happy to merge it :wink:


(Daniel Hollands) #32

I don’t know if I should start a new thread for this or something, but I’ve had this report from a user:

FYI I’ve dismissed the welcome message on http://talk.birmingham.io several times now (on different machines) but was logged in

How is the dismissal handed? Is it based on a cookie, or is a record added to the user?


(Jeff Atwood) #33

I have noticed weirdness with dismissal as anon before. Maybe @zogstrip can elaborate?


(cpradio) #34

I may be wrong, but I believe if you edit the content of the post that is made a banner topic, it brings up the banner again for everyone and they have to dismiss it again. I’ve run into this a few times in our “staging” environment while our admins were trying to get the wording to be “what they wanted”


Dismissed banner not showing up again after being updated
(Régis Hanol) #35

That is how it works right now. The key of the banner topic is based on the actual content of the post.