Option to move accepted answer to the top

I reviewed and merged, I feel it looks a bit naked though without the excerpt would love to see that in as well.

I agree having an excerpt would be nicer, I did get it working by adding to the serialiser:

Edit: wow, quoting [details] went badly

And the code here.

However…

I think if the excerpt is short enough the jumping should be very very limited, under almost all cases. In the vast majority of cases people edit to add more content, not to remove, so the excerpt would be unchanged.

One big issue though is that it has an “up” arrow which is very confusing UX wise, so that would have to go.

The issue is not so much when people edit their solutions - it’s when the solution is changed by the OP or a moderator.

Yep, definitely.

How long do you think the excerpt should be? I had it hardcoded at 100 characters, but that’s a bit arbitrary. Shall I add a setting for it? Or do you think that is configuration for configuration’s sake?

I actually think it should be configurable, 100 is a good default.

I don’t know it should be fairly rare to be mucking with accepted answer, and unaccepting causes a jump anyway. I think we can live with it.

1 Like

Here we go - configurable length quote, click to expand to full post, and only shows the down arrow.

https://github.com/discourse/discourse-solved/pull/50

Having just tried it with a topic with many posts, it doesn’t actually affect the scrolling as much as I thought :slight_smile:

4 Likes

I am quite happy with the styling now! thanks @david

4 Likes