Skip to content

Support for conditions/indicators#9

Closed
janfh wants to merge 64 commits into
codefori:mainfrom
janfh:feature/conditional
Closed

Support for conditions/indicators#9
janfh wants to merge 64 commits into
codefori:mainfrom
janfh:feature/conditional

Conversation

@janfh
Copy link
Copy Markdown
Collaborator

@janfh janfh commented Aug 3, 2025

Implemented support for conditions/indicators. New class Conditional with support for 9 conditions (OR-groups), each with max 9 indicators (grouping by AND) as described in the DDS reference manual. isActive evaluates if conditions are met by given indicator status (DisplayFileIndicators).

Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
Signed-off-by: worksofliam <mrliamallan@live.co.uk>
@janfh janfh self-assigned this Aug 3, 2025
@janfh janfh marked this pull request as ready for review August 4, 2025 18:06
@janfh janfh requested a review from worksofliam August 4, 2025 18:06
@janfh janfh marked this pull request as draft August 5, 2025 13:05
@janfh janfh marked this pull request as ready for review August 15, 2025 18:06
Copy link
Copy Markdown
Member

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

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

Sadly there are soms issues during runtime and I also an issue with the frontend code.

Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at editKeyword (main.js:1264:79)

Comment thread webui/main.js Outdated
@janfh janfh requested a review from worksofliam August 16, 2025 06:30
@worksofliam
Copy link
Copy Markdown
Member

@janfh As part of this PR, I think you should run npm run getTsTypesForFile, which will generate the dspf.d.ts file in webui.

Comment thread src/ui/dspf.ts
Comment on lines +606 to +608
getConditions(): Condition[] {
return this.conditions;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure I understand this API very well. It returns the following interface as an array:

interface Condition {
    indicators: Indicator[];
}

but I don't quite understand it, and it could be me. Is this because each condition line can have 3 indicators, and each line is actually a unique condition (because you can use and or or when testing each condition right?)

Perhaps condition also needs an additional property to handle when O is specified?

interface Condition {
    indicators: Indicator[];
    operator?: `and`|`or`; //and is default?
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For example, here is some DDS for a constant:


     A  01 02N03                        8  3'One, Two, not Three'
     A  01
     AA 02

Does this read as three conditions:

  1. The first with three indicators, the last negated
  2. The second with one indicator
  3. The last with one indicator, and with the A (and) condition?

@worksofliam worksofliam changed the base branch from feature/editor to main February 2, 2026 16:17
@worksofliam worksofliam closed this Feb 2, 2026
@worksofliam
Copy link
Copy Markdown
Member

WHOOPS i didn't meant to close this, but we made the new editor the base branch! so can you re-open this against main?

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