Skip to content

Add support for reading and writing Name & Caption properties to file blocks #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

KoditkarVedant
Copy link
Contributor

Description

Add support for reading and writing Name & Caption properties to file blocks

Fixes #435

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@KoditkarVedant KoditkarVedant requested a review from Copilot April 13, 2025 06:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

KoditkarVedant and others added 4 commits April 13, 2025 14:15
…sure consistent JSON serialization

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… ensure it serializes consistently with the interface

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…JSON contract

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@KoditkarVedant KoditkarVedant requested a review from Copilot April 13, 2025 08:47
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

Test/Notion.IntegrationTests/BlocksClientTests.cs:440

  • [nitpick] Consider adding a comment to clarify why the file name is expected to automatically have a '.jpg' extension after being set, to aid future maintainers in understanding this behavior.
file.Name.Should().Be("Test file name.jpg");

…ly have a '.jpg' or other file extension💡
@KoditkarVedant KoditkarVedant requested a review from Copilot April 13, 2025 08:52
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

Test/Notion.IntegrationTests/BlocksClientTests.cs:442

  • Consider adding additional test cases to cover scenarios where the file's Name property may already include an expected extension versus when it should be auto-appended from the URL. This will help ensure consistent behavior across different file types.
file.Name.Should().Be("Test file name.jpg");

@KoditkarVedant KoditkarVedant merged commit 135b515 into main Apr 13, 2025
6 checks passed
@KoditkarVedant KoditkarVedant deleted the 435-add-support-for-reading-and-writing-names-and-caption-to-file-blocks branch April 13, 2025 08:55
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.

Add support for reading and writing names & caption to file blocks in the public API
1 participant