Skip to content

feat: RSS-SE-12 implement json to yaml conversion - #10

Merged
FierceSloth merged 11 commits into
feature/swaggerEditorfrom
story/RSS-SE-12_implementJsonToYamlConversion
Jul 3, 2026
Merged

FierceSloth merged 11 commits into
feature/swaggerEditorfrom
story/RSS-SE-12_implementJsonToYamlConversion

Conversation

@FierceSloth

Copy link
Copy Markdown
Owner

📋 Trello Task ID

  • RSS-SE-12 (Task ID / Trello Card)
  • No ID (Global fix or chore)

⚡️ Summary

  • Create format-converter feature to detect and convert between JSON and YAML
  • Implement FormatToggle UI component with unknown state handling
  • Integrate format converter logic and toggle into SwaggerEditor widget
  • Add i18n support for the format converter UI

🛠 Type of change

  • feat (New feature)
  • fix (Bug fix)
  • refactor (Code improvement / Refactoring without changing logic)
  • style (Formatting, CSS)
  • docs (Documentation)
  • chore (Configs, Build)
  • test (Testing)

📷 Screenshots / GIFs

image image image

@vercel

vercel Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
swagger-editor-app Ready Ready Preview, Comment Jul 2, 2026 9:53am

export function SwaggerEditor({ value, onChange, format }: IProps) {
export function SwaggerEditor({ value: externalValue, onChange }: IProps) {
const [currentFormat, setCurrentFormat] = useState<DetectedFormat>('yaml');
const [localValue, setLocalValue] = useState(externalValue || '');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential issue. Right now the editor value is duplicated: it lives both in the value prop and in the local localValue state. For example: the parent passes value = 20, we copy it once into localValue, then the child updates localValue = 21, and later the parent resets the prop to 5, but the local state stays 21, because useState does not re-initialize when props change. In React it’s better to have a single source of truth for one piece of data

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out. I’m aware of this error, but I’ve decided to leave it as it is for now and fix it in the RSS-SE-16 card when I’m laying out the main page; that’s when I’ll move the entire state up a level, and there won’t be a local state.

@FierceSloth
FierceSloth merged commit 14afbd7 into feature/swaggerEditor Jul 3, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 99bebeac Deployed Jul 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants