Repository navigation
Rewrite fixes: logo limit, learner community polish, mailing address in Marketing - #920
Merged
Merged
Conversation
The logo picker let creators upload images up to the media dialog's 50 MB default, and the API accepted staff uploads of up to 1 GB for any purpose. - api-contract: SCHOOL_BRANDING_IMAGE_MAX_BYTES (2 MiB), importable from the browser via @courselit/api-contract/school-branding. - api: school_branding upload authorizations must be images within the limit (unsupported_branding_type / file_too_large), and saving the website logo rejects library media that isn't an image or is too large (logo_not_image / logo_too_large). - admin: the website settings and onboarding logo pickers pass the limit to the upload dialog, MediaField also blocks oversized library picks, and the refusals get clear messages.
The learner sidebar footer showed "Powered by CourseLit" under the account menu. It now sits above it, so the account menu stays at the very bottom.
The community post, comment and reply editor offered every default block, including Heading 1, code blocks, dividers, tables and inline images. A shared communityTextProfile (@frontlit/text-editor defineProfile) now allows paragraphs, headings 2 and 3, lists, quotes and the usual marks only; images, videos and files go in as post attachments. Content that holds nodes outside the profile (older posts, or posts made through the API) keeps the default profile while being edited, so nothing is dropped. Rendering is unchanged, since the renderer throws on nodes outside its profile.
As on main, a post's files, GIFs and YouTube videos now sit in one row of equal-height tiles that scrolls sideways, instead of stacked lists. The shared LearnerPostAttachments component is used by the post composer (which showed uploaded files only as name chips), the inline post editor, posts and comments in a community, and the dashboard feed. The old LearnerPostGifs and LearnerPostVideos lists are removed.
The theme cards passed flex-col to the shared Tile, which pushed its radio indicator onto its own row under the colour swatches, where it read like a colour. The cards no longer stack, and they hide the dot altogether (new Tile indicator option): the selected card's border already shows the choice, and the hidden native radio still serves keyboards and screen readers. Other Tile cards keep the dot.
…ress Few schools send marketing email through CourseLit, so the onboarding wizard no longer has an Email step. Its "Get ready to send email" screen now lives in Marketing: Broadcasts, Sequences, Templates and Settings show it until the school has a mailing address, and Settings > Mail delivery edits the same form afterwards. - The address is stored as parts (line1, optional line2, city, region, postal code and an ISO country code) through SendLit's new postalAddress setting (sendlit 0.6.0, @sendlit/email-blocks 0.8.0). SendLit formats it into the footer text, and CourseLit uses the same country list and formatter from @sendlit/email-blocks/postal-address. - The form lists every country and starts on the browser's one. Its preview is SendLit's own render of a marketing email, so the footer shows the address exactly as recipients will see it. - The wizard's sender name field is dropped: it was never saved. - Sending, the onboarding checklist and the editor banners check postalAddress. The MCP descriptions no longer mention a sender name or reply-to that don't exist. - Docs: create-a-school and marketing-settings are updated. BREAKING CHANGE: GET/PATCH /v1/school/mails/settings (and the matching MCP tools) use postalAddress only; plain-text mailingAddress is refused. The onboarding step "email" no longer exists.
The contract changes in 6191a1d (postalAddress mail settings, no "email" onboarding step) left apps/api/openapi.json stale, failing check:drift.
The space dialog asked for a "Lucide icon name", which creators don't know, and the storefront ignored the value anyway: every space showed the same speech-bubbles icon. - api-contract: SPACE_ICONS (@courselit/api-contract/space-icons), a curated list of icon names with plain labels; the API accepts only those (invalid_logo otherwise), defaulting to MessagesSquare. - admin: the Icon field opens a popover grid of icons (native radios, so arrow keys move and Enter or a click confirms); the space list shows each space's icon. Adds a codelit Popover wrapper. - storefront: the learner sidebar shows each space's chosen icon. Both apps map names to explicit icon imports typed against the shared list.
A community plan's included products are now a choice: All products (every published product, including ones published later) or Selected products (picked from a dropdown; an empty selection includes none). - Access stays an eager learner_memberships row per product. Joining, approval and payment grant the plan's products. A background job (sync_plan_included_products on the platform job queue) gives a newly published product to all-products plan members, archived plans included, and reconciles current members when a plan's products change: missing products are granted, removed ones expire so progress returns on re-add. - Rows the system adds or revokes on its own queue no SendLit events (upsertLearnerMembership / revokeLearnerMembership silent option); a learner's own action (join, approval, purchase) still does. - The product-level includedWithCommunity flag and its sync are removed; a product may be published without its own plan when an active community plan includes it. - Storefront sales pages offer the community plans that include the product; the admin plan dialog and list show All products or the selection; MCP marks updateCommunityPlan high-impact; docs updated. - Tests cover 42 scenarios (plan-included-products.test.ts and the storefront, page-blocks and admin unit tests). BREAKING CHANGE: plans gain includesAllProducts; products lose includedWithCommunity (column and API field).
…lit into t3/rewrite-bug-fixes # Conflicts: # apps/api/src/website.ts
The API lets a product with no plan of its own go live when an active community plan includes it (all products, or by name), but the admin checklist still asked for a payment plan and kept "Make course live" disabled. The admin product detail now reports includedInCommunityPlan and the checklist counts it as a way to join.
…rewrite-bug-fixes
…lit into t3/rewrite-bug-fixes
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.
A batch of bug fixes and small improvements to the rewrite, one commit each.
Changes
e45e13c9). The logo picker allowed 50 MB and the API accepted staff uploads up to 1 GB. The contract now hasSCHOOL_BRANDING_IMAGE_MAX_BYTES. The API refuses oversized or non-imageschool_brandinguploads and logo picks from the library. The admin pickers pass the limit to the upload dialog and show clear messages.30fd5db7) in the learner sidebar.bac61b1e). The post, comment and reply editor uses acommunityTextProfile: Heading 2 and 3, lists, quotes and the usual marks, with no Heading 1, code blocks, dividers, tables or inline images. Media goes in as attachments. Content outside the profile keeps the default profile while being edited, so nothing is dropped.f39305d1), as onmain. Files, GIFs and YouTube videos share one row of equal-height tiles in the composer, the post editor, posts, comments and the dashboard feed.f31e1824). The dot was stacking under the colour swatches. The selected border already shows the choice.Tilegets anindicatoroption.6191a1d3, breaking):postalAddress(feat: store the mailing address as structured postal address fields sendlit#218, released assendlit@0.6.0and@sendlit/email-blocks@0.8.0). SendLit formats the footer text, and CourseLit uses the same country list and formatter.Breaking
GET/PATCH /v1/school/mails/settingsand their MCP tools usepostalAddressonly; plain-textmailingAddressis refused.emailno longer exists.Testing