Conversation
- New route /books/new2 (temp, alongside /books/new for reference) - WizardProvider context centralising all step state - Preset cards grid (textbook, storybook, reference, custom) with responsive layout (1→2→4 columns) - HoverCard popover on gear badge listing searchable preset features - Examples modal per preset: left sidebar (recommended-for + book list) + right tabbed iframe (Original PDF / ADT Book) - PDF toolbar suppressed via hash params; ADT view padded - Custom preset hides examples/features badge (no pre-selected values) - Full i18n coverage for en, es, pt-BR
…rst step - basic info
- Updated ExamplesModal to utilize DialogTitle and DialogDescription for improved accessibility. - Modified PresetCard to use a label for radio button selection, enhancing user interaction. - Added aria attributes to improve screen reader support and overall accessibility. - Introduced radio button functionality for preset selection in PresetGrid, streamlining the user experience.
…asic info - Added PdfCoverPreview component to display a preview of the uploaded PDF cover. - Updated wizard form to include new fields for start and end pages. - Enhanced the first step of the wizard with PdfUpload and PageRange components for better user experience. - Included pdfjs-dist as a dependency for PDF rendering capabilities.
- Refactored ExamplesModal to utilize a new Tabs component for better tab management. - Removed the custom TabBar implementation and integrated TabsList and TabsTrigger for improved UI consistency. - Enhanced accessibility and user experience by streamlining the tab selection process for PDF and ADT Book previews.
…tor RangeSlider - Added TooltipProvider to main.tsx for consistent tooltip management across the application. - Refactored Tooltip component in tooltip.tsx to enhance structure and usability. - Updated RangeSlider component to utilize the new Tooltip implementation, improving user interaction with tooltips for help icons.
- Introduced a caching mechanism for PDF file uploads to improve performance by reducing redundant page count calculations. - Updated state management for total pages to leverage cached values when the same file is uploaded, enhancing user experience. - Ensured proper reset of cache values when no file is selected, maintaining accurate state in the wizard form.
…ctor constants - Added LayoutPreview component to display layout options in the BookCreationWizard. - Refactored the import paths for constants and example books to streamline the codebase. - Removed the deprecated constants file, consolidating preset configurations into a single location for better maintainability. - Updated the preview rendering logic to accommodate the new layout options, improving user experience during the book creation process.
…re and accessibility - Updated RangeSlider component to include better input handling and accessibility features. - Introduced useId for unique input IDs and improved label association for inputs. - Refactored MinMaxInput to utilize the new Input and Label components for consistency. - Enhanced clamping logic for slider values and adjusted min/max handling for better user experience. - Added aria attributes for improved screen reader support and overall accessibility.
…actor step validation logic - Integrated useBooks hook to fetch existing book labels for validation. - Updated step validation logic to include existing book labels, improving user feedback during the book creation process. - Refactored the isValid function in STEPS to accept a validation context, allowing for more dynamic validation based on existing data. - Created a new ProjectNameField component for better handling of project name input and error display. - Introduced projectLabelSchema for improved validation of project names, ensuring uniqueness and format compliance.
…selection - Introduced a new RadioGroup component using @radix-ui/react-radio-group for better radio button management. - Added render strategy selection functionality in the BookCreationWizard, allowing users to choose between different layout strategies. - Implemented a LayoutPreview component to visually display the selected layout strategy. - Updated the wizard form to include render strategy and output language handling, enhancing user experience during book creation. - Added a new preview image for the two-column story layout.
…er interaction - Introduced a new Popover component using @radix-ui/react-popover for contextual information display. - Added SegmentedControl component to allow users to select between different page grouping modes (Spread and Single). - Updated wizard form to include a new spreadMode field, enhancing layout options for users. - Integrated PageGroupingMode component into the wizard's step 2 layout options for improved user experience.
…uping features - Updated SegmentedControl to allow empty string as a value for better handling of unselected states. - Introduced new SectioningMode component to provide users with options for page sectioning (Page, Dynamic, Section). - Enhanced PageGroupingMode to utilize InfoCarousel for contextual help on page grouping options. - Refactored wizard form to include new fields for page grouping and sectioning mode, improving layout configuration. - Updated validation logic in STEPS to ensure all new fields are considered for form validity.
- Added CSS properties for dynamic preview sizing in the PreviewContainer component. - Introduced a variant prop to PreviewContainer for desktop and dialog layouts. - Enhanced the dialog content with a description for better user guidance during book preview. - Updated InfoCarousel to simplify props and improve Popover content alignment. - Refactored LayoutPreview for better responsive design and accessibility improvements.
…ng and responsive design - Updated BookCreationWizard to conditionally display a quick create button based on the current step. - Refactored WizardFooter for improved layout responsiveness and user interaction. - Introduced a caching mechanism for PDF cover previews in PdfCoverPreview to optimize rendering performance. - Added dynamic PDF loading in PdfUpload to handle page count retrieval more efficiently. - Created a new pdfjsLoader module for better management of PDF.js imports and worker setup.
…kCreationWizard - Added a new StudioTopBar component for consistent navigation and branding across the application. - Integrated StudioTopBar into the BookCreationWizard to enhance user experience with a clear title and navigation options. - Updated the HomePage to utilize StudioTopBar, improving the overall layout and accessibility of the application.
…nent - Replaced inline sectioning mode selection with a new SectioningModeSelect component for improved modularity and maintainability. - Introduced icons for each sectioning option to enhance user experience and visual clarity. - Cleaned up the SectioningMode component by removing unused code and simplifying the rendering logic.
- Introduced ImageProcessingPreviewPane and ImageProcessingFeatureSwitch components for enhanced image processing options. - Updated BookCreationWizard to include a new step for image processing, allowing users to configure cropping and segmentation settings. - Enhanced wizard context to manage preview focus state for improved user interaction during image processing. - Added new types and utility functions to support image processing features, including minimum side thresholds for segmentation. - Refactored existing components to accommodate the new image processing functionalities, ensuring a cohesive user experience.
… design - Added a size prop to the LanguagePicker component to allow for "sm" and "default" variations. - Updated label and hint styles based on the size prop for improved visual consistency. - Adjusted input and button styles to accommodate different sizes, enhancing user experience. - Refactored class names using the cn utility for better readability and maintainability.
- Introduced a new step for language selection in the BookCreationWizard, allowing users to set an editing language and choose output languages. - Added LanguagesPreviewPane to display selected languages and provide user feedback on language setup. - Updated wizard steps to include the new language selection step, enhancing the overall book creation process. - Refactored wizard form to accommodate new fields for editing and output languages, ensuring proper state management.
…eationWizard - Added a new endpoint for uploading styleguide .md files, with validation for file type and name. - Introduced a Styleguide selection step in the BookCreationWizard, allowing users to choose or upload styleguides. - Created StyleguidePreviewPane to display the selected styleguide's preview, enhancing user experience. - Updated wizard form to manage styleguide state and integrated styleguide options into the wizard steps. - Refactored constants and types to accommodate new styleguide features, ensuring consistency across the application.
… UI and icons - Updated PdfCoverPreview to include a new BookOpen icon and enhanced layout for better user experience. - Refactored LayoutPreview to incorporate a LayoutTemplate icon and improved messaging for render strategy selection. - Enhanced overall styling and structure for both components to provide clearer guidance and visual appeal.
- Introduced a search input to filter styleguides based on user input, enhancing usability. - Implemented logic to conditionally display styleguides based on the search query. - Updated the component to manage search state and improve the overall user experience in selecting styleguides.
…nd visuals - Removed redundant section label for cleaner UI. - Updated diagram layouts for better spacing and alignment. - Introduced new SVG icons for visual clarity in sectioning options. - Refined styling for dynamic and section diagrams to enhance user experience.
… and visuals - Updated the layout and styling of the CroppingIllustration component for better visual clarity. - Enhanced the before-and-after cropping display with new icons and improved text styling. - Refined the overall structure and spacing for a more cohesive user experience in image processing previews.
- Refactored DynamicPreview to feature a textbook-style page mockup titled "The Water Cycle." - Enhanced layout with improved structure, including a chapter heading, intro paragraph, and diagram with captions. - Updated styling for better readability and visual appeal, including responsive design adjustments. - Removed unused imports and streamlined component structure for clarity.
|
@Eliezir are you waiting for approval of the UI before adding the dependencies to packages.json? |
|
For the missing demonstration books @gbergengruen will collect the following to share with you. Textbooks
Storybook
Reference
|
- Introduced a new function to suggest unique labels for uploaded PDF files based on existing book labels.
- Introduced a new feature for figure extraction, allowing the detection and cropping of complex charts and figures from pages. - Updated the wizard configuration to include a toggle for figure extraction. - Enhanced the user interface with new illustrations and labels for the figure extraction feature. - Adjusted related components and types to accommodate the new functionality.
Just finished the changes, sorry for the delay.
Two questions while I have you:
|
- Added validation hints and scrolling functionality to guide users through the wizard steps. - Implemented state management for user attempts to proceed, displaying hints for invalid inputs. - Updated step definitions to include validation logic and hints for better user experience. - Enhanced the UI with new IDs for elements to facilitate scrolling to invalid fields. - Improved localization for new validation messages in English, Spanish, and Portuguese.
Not really, Its already on the branch apps/studio/package.json |
|
Ok when I thought there was a package I had to install but I may be
mistaken - not a big deal
Sent from Gmail Mobile
…On Mon, Apr 6, 2026 at 5:30 PM Eliezir Moreira ***@***.***> wrote:
*Eliezir* left a comment (unicef/adt-studio#235)
<#235 (comment)>
@Eliezir <https://github.com/Eliezir> are you waiting for approval of the
UI before adding the dependencies to packages.json?
Not really, Its already on the branch apps/studio/package.json
<https://github.com/unicef/adt-studio/pull/235/changes#diff-14a87cb8301b0736bd6722d3ad7b33f96f0da057b76a9aa6d98537b2a5ff69ce>
—
Reply to this email directly, view it on GitHub
<#235 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABNBVFYPN2QHHDDCDAYFSAD4UQOZHAVCNFSM6AAAAACXLMI7QWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOJVGEYTSMBSHE>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Hey guys, I have just sent an email to both of you with most of the resources requested here... I'm missing out some... |
…mponents for PT-BR translations - Updated the InfoCarousel component to ensure a minimum height for cards. - Added a descriptive paragraph in Step0Preset to clarify preset functionality. - Enhanced ProjectNameField with localization support for labels and placeholders. - Adjusted PageGroupingMode and SectioningMode to include locale in dependencies. - Standardized SectioningModeSelect to include locale in dependencies. - Corrected capitalization in ImageProcessingPreviewPane for figure extraction label. - Updated localization files for English, Spanish, and Portuguese to include new strings and corrections.
|
Re: Activities Generator off behavior Good question. If I have turned off activity generation, it should route those section types to the default render strategy, not the activity types. Re: figureExtraction → vector_text_grouping mapping Yes, that’s the correct mapping. vector_text_grouping is the backend config key. Good call making it recommended for Textbook and Reference but off for Storybook. |
|
I did a code review pass — a few things to address before merge: Bugs to fix:
The “Required Fields” badge shows on Step 4 (Languages) even though nothing is required there. |
…ckoff - Added error logging for pipeline kickoff failures to enhance debugging and user feedback.
- Removed unnecessary local state for creation status in BookCreationWizard. - Updated creation logic to utilize the pending state from the mutation directly, improving clarity and reducing potential bugs.
- Trimmed input for segmentation minimum side and added validation to prevent NaN values from being set in the configuration. This improves the robustness of the image segmentation feature in the book creation process.
- Updated the BookCreationWizard to conditionally set existing book labels based on the loading state of the books data. This prevents undefined values during the validation process in the wizard steps, ensuring a smoother user experience.
…eation - Introduced a new utility function to parse and validate positive integers for start and end page inputs, ensuring they are within a valid range. - Updated the configuration building logic to incorporate this validation, improving the robustness of the book creation process.
…eationWizard - Updated the BookCreationWizard to conditionally display the "Required Fields" label based on the presence of required fields in the step definition. - Enhanced the StepDef interface to include an optional hasRequiredFields property, allowing for more flexible step configurations.
- Improved error handling in the PDF upload process to set a user-friendly error message when a PDF cannot be read due to corruption or password protection. - Added localization support for the new error message in English, Spanish, and Portuguese, ensuring consistent user feedback across languages. - Updated the PDF upload component to display the error message conditionally, enhancing the user experience during file uploads.
…ectioning logic - Removed the constant ACTIVITY_SECTION_TYPES as it was no longer needed in the sectioning configuration. - Updated the logic in buildSectioningConfig to simplify the prunedSectionTypes assignment, ensuring it only includes appConfig.pruned_section_types. - Clarified comments in web-rendering to better explain the rendering strategy when generate_activities is false.
- Added a loading state to the BookCreationWizard to prevent multiple create requests during the book creation process. - Introduced a ref to track the creation status, ensuring that the create function does not execute concurrently. - Updated the component to reflect the new loading state in the UI, improving user experience during book creation. - Cleaned up dependencies in PageGroupingMode and SectioningModeSelect to optimize performance.
Hey @elasticsounds, I fixed all the reported bugs, the double-click race, the api.runStages logging, the segmentationMinSide NaN case, the page range validation, and the Require Fields badge on Step 4. For the double-click: didn't go with createMutation.isPending because it only covers the mutation itself, once the book is created the flag drops to false, but api.runStages and navigate haven't run yet, causing a visible flicker back to the normal button before navigation. Used a local isCreating state (spans the full flow) with a synchronous useRef guard to block re-entry before React re-renders. Extra changes made:
|
05d9607 to
57bf9a5
Compare
Book Creation Wizard
Replaces the old multi-step book creation form with a new full-screen wizard. The wizard guides the user through preset selection and four configuration steps, generating the full
AppConfigfor the new book.Wizard Steps
Step 0 — Preset Selection
Full-screen card picker. The user selects a preset (Textbook, Storybook, Reference, or Custom), which pre-fills the form defaults and recommendations for all subsequent steps.
Step 1 — Basic Information
PDF upload, project label, and optional page range (start/end page). The label is validated against existing book labels to prevent duplicates.
Step 2 — Visual Layout
Render strategy selection (Dynamic AI, Dynamic Overlay, Single Column, Two Columns, Two Columns Story), page grouping (single pages vs. spreads), and page sectioning mode (page-level, dynamic, or section-level). A live preview pane renders a mock of the selected strategy.
Step 3 — Content Processing
Activity generator toggle, image filters (min/max side), image cropping, and image segmentation. The preview pane shows a contextual mock for each setting group (image filter, cropping, segmentation).
Step 4 — Languages
Editing language (the language shown in the ADT while the editor is working on the book — may differ from the book's original language) and output languages (the languages published for readers). The preview shows a two-panel mock with a live summary sentence.
Step 5 — Style Guide (implemented, temporarily disabled)
We built a full Style Guide step that lets the user pick a style guide (typography, colors, and component layout for generated pages) with an iframe preview of the selection. The step is commented out in the wizard for now (
STEPSinsteps.ts, withStep5still in the codebase) until we settle the best product use cases for it. We can re-enable it, move it elsewhere, or drop it once that is clear.How Presets Work
Presets are defined in
apps/studio/src/components/wizard/constants.tsas entries in thePRESETSarray. Each preset has:id— unique identifier (textbook,storybook,reference,custom)title/description— displayed in the preset cardrecommendedFor— bullet list shown in examplesModalexampleBooks— books shown as examples for that preset (see below)renderStrategies— the subset of render strategies available for this presetrecommendedStrategies— strategies that get a "Recommended" badge in the pickerrecommendations— aPartial<WizardFormValues>that controls which options show a recommendation indicator across all subsequent steps (render strategy, page grouping, sectioning mode, activities, etc.)formDefaults— values pre-filled into the form when the preset is selected (e.g. image filter bounds)baseConfig— the full pipeline config block that gets spread into the book'sAppConfigat creation time. This is where LLM model names, prompt names, timeouts, temperatures, and render strategy configs live.There are no YAML preset files. All preset config — including machine-level pipeline config — lives in
constants.ts. ThebuildConfigOverrides()function inbookCreationConfig.tsmergesbaseConfigwith the wizard form values to produce the finalconfig.yamlwritten to the new book directory.Adding a New Preset
PRESETSinconstants.tswith all required fields.idto thePresetIdunion type in the same file.idtoLayoutTypeinpackages/types/src/config.tsif it maps to a new layout type.getPresetAccent()entry for the color scheme.Icon.How to Add a New Wizard Step
apps/studio/src/components/wizard/stepNYourStep/with anindex.tsxthat exports the step component.YourStepPreviewPane.tsxin the same directory. Use the sharedPreviewShellcomponent fromshared/PreviewShell.tsxas the outer wrapper.STEPSarray insteps.tswithtitle,description,component, andisValid.BookCreationWizard.tsxinsiderenderPreviewContent()— match oncurrentStepindex.WizardFormValuesinwizardForm.tsand initialize them indefaultValues.buildConfigOverrides()inbookCreationConfig.tsto map the new form fields toAppConfigkeys.Example Books — Still Needs Work
Each preset has an
exampleBooksarray. Currently all presets share the same placeholder PDF/ADT URLs (DEMO_PDF_URL/DEMO_ADT_URL). We still need to define real books and ADT instances to show as examples for each preset. Books markedcomingSoon: trueshow a badge instead of a link. Once real assets are available, replace the shared demo URLs with per-preset ones in each preset'sexampleBooksentries.Open Questions
Should we keep the preset color scheme throughout the wizard?
Right now, once the user selects a preset, its accent color propagates through the entire wizard — step counter, navigation buttons, recommendation badges, and the "Step N of N" label all adopt the preset's hue. This creates a sense of continuity but adds visual complexity. Should we keep this, simplify to a single brand color, or limit the accent to just the preset step?
Activity generator off — what should happen to activity sections?
When
generate_activitiesis disabled, the current behavior is to prune all activity section types entirely — they are removed from the book as if they don't exist. Is this the right behavior, or should disabled activities be kept as static PDF page screenshots instead? The pruning approach is simpler and avoids partial content, but it may surprise users who expect to see the original page even when activities are off.