V0.1.5#31
Open
aaronhaslett wants to merge 72 commits into
Open
Conversation
This hack was introduced to allow wagtailfontawesome icons to render with <span> tags, but it's kind of horrible so I'm pulling it out in favour of just using upstream wagtail icons for now.
DB conversion rules to support new wagtail's markup DB format
I don't know why this is necessary but 2.0.2 wagtail seems to want it
You need a strong background in draftail customization to understand this
We're stuck with the following bad things:
* We gotta save to the DB in the HTML format we're going to render.
This means draftail is sharing that format so we have to save
everything draftail needs.
* There needs to be a system-unique DOM selector rule to find tags in
the HTML to convert to contentstate for the draftail editor.
To solve both at the same time we add an attr called modelchooser_choice_{}
which holds the choice id, and the name of the attr resolves the unique
DOM selector thing, because we can use span[modelchooser_choice_{}].
That's fine, frontend can just ignore it, but the big drawback is that
draftail needs the DOM element's children so it can display the block,
but then the frontend gets it too. Frontend does the correct thing and
replaces the text with live data, but you see a flicker of the alt
text. Really annoying, but will resolve soon with some kind of
rewriter solution.
Upgrade/iconfix
…ser_validation fix remotemodelchooser validation
dases
reviewed
Jun 27, 2023
| else: | ||
| return value.pk | ||
| return '' | ||
| return value |
There was a problem hiding this comment.
When value is None here we end up with stringified "None" as the value in form field.
Suggested change
| return value | |
| return value or "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.