codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
397 stars 68 forks source link

Expanding post draft logic to handle fields other than the body #1397

Closed Oaphi closed 2 months ago

Oaphi commented 2 months ago

closes #1395

In addition to the post's body, we now save (all fields are optional, so we only save them if the context allows for it):

Those fields are stored individually, I opted to do so to not invalidate drafts created prior to the change, but open to switching to a hash value instead.

ws909 commented 2 months ago

I can't see a mention of tag synonyms, tag name ("post title" covers that, maybe?), and parent tag. Are these three included?

Oaphi commented 2 months ago

I can't see a mention of tag synonyms, tag name ("post title" covers that, maybe?), and parent tag. Are these three included?

Parent tag and synonyms are a no-go for now, I tried, but the scope of the change required to support them would be quite significant (they are loaded in a very different manner as opposed to post tags), so probably some time later as a separate improvement. As for the name, yeah, seems to be worth adding.

ws909 commented 2 months ago

In that case, this might be related: 500, internal server error, as I try to create a tag

Oaphi commented 2 months ago

In that case, this might be related: 500, internal server error, as I try to create a tag

I don't think this one's in scope of the change either, there is an issue open to address that (https://github.com/codidact/qpixel/issues/1353). I may be the one fixing it, or maybe not, depending on what my availability is. Doesn't seem like something that would be hard to solve, though.

ws909 commented 2 months ago

I meant that it may be related to the way that synonyms and parent tag are implemented, not that they're in scope here, after you ruled those two out. But it seems you've located the issue, then, and that the problem is that the system tries searching for the synonyms before creating the tag.

Oaphi commented 2 months ago

@ws909 ah, I thought you wanted me to make the change in this PR, sorry. If I get some time to spare, will look into it, just not as part of this change to avoid scope creep.

cellio commented 2 months ago

@ArtOfCode- did the updates here address your concerns?

ArtOfCode- commented 2 months ago

LGTM