- There’s no mockup; what’s it going to look like?
- On desktop?
- On mobile?
- With a dark theme, or vincent or something else?
it can just be the straight list of badges in a UL - no styling required
- Is it going to slow down my page load? (Badges don’t come down the wire already, so I have to make a separate request somehow)
could call via ajax but having this load inline would be very unlikely to cause the page to load noticeably slower - Discourse is built as a single page application so youre not reloading headers/footers etc - The posts are rendered as widgets, meaning that there’s no plugin outlet there, and getting changes made to core is a big pain, meaning the content insertion bit is not straightforward. How do I take the JSON I’ll get from the API and put it into the widget? (NB that this is the most likely part to break in the future)
this is the part Im unfamiliar with - How often do I need to refresh the badges?
- When the page is reloaded?
- Each time a topic is viewed?
- Do I need to live update them?
at the same time the posts are loaded - no need to live update
- How many badges am I going to show? Is it different for desktop and mobile? What if they don’t fit in the space allowed?
all badges - could limit with CSS if necessary - Which badges show up? The most recent? The most ‘prestigious’?
this is a good point that I didnt clarify - should be in order of the badge ID which is assigned on creation - Do I need to write a separate endpoint for this, or can I use the existing one for badges? (Depends on the answers to the previous questions)
- What happens when I hover, or click on a badge?
takes you to the corresponding badge page
2 Likes