v2.0.0#13
Open
jonathangomz wants to merge 42 commits into
Open
Conversation
Constructor for blocks with single `Text` instance in content. Also refactor blocks main constructors to make it shorter.
Add `bold`: Set text to bold. Add `italic`: Set text to italic. Add `underline`: Set text to underline. Add `code`: Set text to code style. Add `color`: Set a different color for the text. Add static list method to generate textual lists with `Text` instances.
Add `src/` directory Add exports to improve usage Remove base fields class Change from public to private the token, version and dateVersion variables for clients
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
- Coverage 96.84% 88.85% -8.00%
==========================================
Files 24 26 +2
Lines 698 951 +253
==========================================
+ Hits 676 845 +169
- Misses 22 106 +84
☔ View full report in Codecov by Sentry. |
Owner
Author
|
Publish successfully version 2.0.0-beta1 🎉 |
Owner
Author
|
Publish successfully version 2.0.0-beta2 🎉 |
For mandatory database properties
Throws `FormatException` if any property is null inside the json given
Updates documentation Removes unused code - empty constructor - addPropertiesFromJson Improves `withDefaults` constructor & rename it to `simple`
And mark as deprecated list databases method
and add name as a base field of properties
and adds more expectations for retrieve a database
and DateTime errors
Adds missing url field from `toJSON` Removes `this` for usage of class member when is obvious Improves database test (logic and style)
And updates sdk version
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.
Update at 24/Feb/2022 at the 02:53 am, because why not:
I'm doing a huuuuuge update for this package and I will be using this version (2.0.0) for that update. Practically I'm going to break all (even me) and do it again. I'm going to reuse a lot of code but I HAVE TO update and fix a lot of logic bugs. I don't know when I'm going to finish but to say something let say
31/03/2022.If someone read this please wish me luck.
See my notes here in Notion of course.
enumsto have atoString()(and maybetoType()) built-in instead offromXTypeToStringand that stuff.Problem: The users cannot access to the block content from pagination because use the
Blockclass and it not contains a content field or something like that.Solution: See how new database properties works and do the same for blocks.
Problem: ?
Solution: I don’t even understand the problem.
Problem: The package use a different structure from the official package on JavaScript.
Solution: Follow a similar structure. At least at usage level.
Important:
Some of the changes bellow will be canceled even they where accomplished just in the name of YAGNI (You Ain't Gonna Need It), and other will be added... actually a lot of things will change and even me, who is making them, don't know how is going to end, so yeah, don't pay attention to the list bellow.
This PR will be open until the next release (tentative date
04/08/2021). It will contain any pre-release update for this version.New feature: 🐣
Breaking change: 🍗
Database.✅blocksforChildrenconstructor. ✅textSeparationChildren:headingparagraphtoDonotion-sdk-jssrc/)Paragraph:Paragraph.text('some text here...')ToDo:ToDo.text('some text here...', checked: true)Heading:Heading.text('some text here...', type: 2)BulletedListItem:BulletedListItem.text('some text here...')NumberedListItem:NumberedListItem.text('some text here...')Toggle:Toggle.text('some text here...', children: [])🐣 Add more constructors forHeadingclass:one: Heading with type 1 by default.two: Heading with type 2 by default.three: Heading with type 3 by default.Textclass: ✅code: Text with code style by default.italic: Text with italic style by default.bold: Text with bold style by default.underline: Text with underline style by default.color: Text with different color of default.list(List<Text> texts, String separator, String lastSeparator): ✅Notion API Package [v1.2.1]