Conversation
Reviewer's GuideAdds missing Yjs database keys and corresponding typed getters, and ensures database group objects are initialised with a type, fixing issues with group metadata and calculations for relations and grouped views. Class diagram for updated Yjs database types and group initializationclassDiagram
direction LR
class YjsDatabaseKey {
<<enumeration>>
data
iid
database_id
is_two_way
reciprocal_field_id
reciprocal_field_name
source_limit
target_limit
relation_field_id
target_field_id
calculation_type
calculations
field_id
calculation_value
cv
source_field_type
condition
schema_version
format
filter_type
visible
collapsed_group_ids
hide_ungrouped_column
collapse_hidden_groups
first_day_of_week
}
class YDatabaseGroup {
+get(key YjsDatabaseKey.field_id) FieldId
+get(key YjsDatabaseKey.type) number|string
+get(key YjsDatabaseKey.content) string
+get(key YjsDatabaseKey.groups) YDatabaseGroupColumns
+get(key YjsDatabaseKey.collapsed_group_ids) YArray_string_or_string_array_or_undefined
}
class YDatabaseGroupColumns {
<<typealias>>
elements : Array_GroupColumn
}
class Array_GroupColumn {
<<object>>
id : string
visible : boolean
}
class YDatabaseCalculation {
+get(key YjsDatabaseKey.field_id) FieldId
+get(key YjsDatabaseKey.id) string
+get(key YjsDatabaseKey.cv) string
+get(key YjsDatabaseKey.type) string|number
+get(key YjsDatabaseKey.calculation_value) string|number|undefined
}
class YMapFieldTypeOption {
+get(key YjsDatabaseKey.name) string
+get(key YjsDatabaseKey.icon) string
+get(key YjsDatabaseKey.description) string
+get(key YjsDatabaseKey.condition_value) string
+get(key YjsDatabaseKey.reciprocal_field_id) string|undefined
+get(key YjsDatabaseKey.reciprocal_field_name) string|undefined
+get(key YjsDatabaseKey.time_format) string|undefined
+get(key YjsDatabaseKey.date_format) string
+get(key YjsDatabaseKey.database_id) DatabaseId
+get(key YjsDatabaseKey.is_two_way) boolean
+get(key YjsDatabaseKey.include_time) boolean
+get(key YjsDatabaseKey.source_limit) number|undefined
+get(key YjsDatabaseKey.target_limit) number|undefined
+get(key YjsDatabaseKey.calculation_type) number
+get(key YjsDatabaseKey.show_as) number
+get(key YjsDatabaseKey.format) string
+get(key YjsDatabaseKey.auto_fill) boolean
}
class YDatabaseField {
+fieldId : FieldId
+fieldType : FieldType
}
class YDatabaseGroupFactory {
+generateGroupByField(field YDatabaseField) YDatabaseGroup
}
class YArray_string_or_string_array_or_undefined {
<<union>>
}
class FieldId
class DatabaseId
class FieldType
YDatabaseGroup o-- YDatabaseGroupColumns : groups
YDatabaseGroup --> YjsDatabaseKey : uses_keys
YDatabaseCalculation --> YjsDatabaseKey : uses_keys
YMapFieldTypeOption --> YjsDatabaseKey : uses_keys
YDatabaseGroupFactory --> YDatabaseGroup : creates
YDatabaseGroupFactory --> YDatabaseField : reads
YDatabaseGroupFactory --> YjsDatabaseKey : sets_field_id_id_type
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Description
Checklist
General
Testing
Feature-Specific
Summary by Sourcery
Align Yjs database types and keys with new relation, grouping, and calculation metadata requirements and ensure groups are created with an explicit type.
New Features:
Bug Fixes:
Enhancements: