Skip to content

Conversation

@mfori
Copy link
Member

@mfori mfori commented Nov 1, 2024

This PR replace allowAbsolute/allowRelative boolean properties for datepicker with single dateType property that accepts values absolute, relative and absoluteOrRelative based on:

dateType property:

  • is optional
  • is valid only when editor is datepicker
  • is only for ui input representation, no validation is executed based on this property

@mfori mfori added the t-console Issues with this label are in the ownership of the console team. label Nov 1, 2024
@mfori mfori requested review from drobnikj and gippy November 1, 2024 09:10
@mfori mfori self-assigned this Nov 1, 2024
@github-actions github-actions bot added this to the 101st sprint - Console team milestone Nov 1, 2024
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Nov 1, 2024
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "datepicker", "hidden"] },
"isSecret": { "type": "boolean" },
"editor": { "enum": ["javascript", "python", "textfield", "textarea", "hidden"] },
"isSecret": { "enum": [false] },
Copy link
Member

Choose a reason for hiding this comment

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

This is to force it to just a single value?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already after the

"if": {
    properties": {
        "isSecret": {
            "not": {
                "const": true
             }
         }
    }
},

So there can't be any other boolean value then false. It's not necessary but I like it in the same way I did with:

"editor": { "enum": ["datepicker"] },

@mfori mfori requested review from fnesveda and removed request for drobnikj November 4, 2024 19:06
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

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

As I understand this, this is a breaking change, because suddenly the input schemas with the old allowAbsolute etc. properties will be invalid. Just to be sure, is that OK? Were they not documented anywhere yet? Are there no Actors with input schemas containing those properties?

Otherwise looks good.

@mfori
Copy link
Member Author

mfori commented Nov 5, 2024

As I understand this, this is a breaking change, because suddenly the input schemas with the old allowAbsolute etc. properties will be invalid. Just to be sure, is that OK? Were they not documented anywhere yet? Are there no Actors with input schemas containing those properties?

Otherwise looks good.

Yes, these old values allowAbsolute and allowRelative were never documented anywhere and are not used by any Actors. The documentation for this new property is ready here: apify/apify-docs#1227

@mfori mfori merged commit 3309290 into master Nov 5, 2024
9 checks passed
@mfori mfori deleted the feat/datepicker-datetype-property branch November 5, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-console Issues with this label are in the ownership of the console team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants