etclabscore / etclabscore/eserialize-website

show all possible result types instead of one user-defined choice? aka Automatic mode?

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

I have to do a rather lot of clicking to be explicit about the conversions I want. Maybe we could save a few clicks by doing all conversions instead manually-registered one-offs, so user can just select (read, choose to interpret) desired output from set of results.

Currently steps are:

1. Enter value.
2. Select input type (Hex <-> String/Number/Date)
3. Select output type (eg. String/Number/Date).
4. Do something with output (read, copy, whatever)

**Describe the solution you'd like**

I'm wondering if the interface can be simplified to convert between all formats simultaneously at least for hex input, leaving the user's only job being:

1. Enter value.
2. Read output(s).

So when converting _from_ Hex, all possible result types (String, Number, Date) are shown.

Next level might be to use regexs to infer value type, and be able to remove having to manually swap between Hex // Other input data types, and to show only plausible/non-"erroring" return values given an arbitrary input (hide `NaN` results, etc).

Eg.

Value: ____________

:arrow_down:

Value: 0xd3________

:arrow_right:
- `From Hex ( 0xd3 ) `
> -> `Number = 211`
> -> `String = �`
> -> `Date = Wed Dec 31 1969 18:03:31 GMT-0600 (Central Standard Time)`

- `From String ( 0xd3 ) `
> -> `Hex = 0x30786433`

- `From Number ( 0xd3 )`
> -> `Hex = 0x0`

- `From Date ( 0xd3 )`
> -> `Hex = NaN`

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing conversion interface and how hex, string, number, and date inputs and outputs are represented. The initial scope should be agreed before implementation: showing all result types for hex input is the concrete proposal, while regex-based inference and hiding implausible results are follow-up ideas. Done means a user can enter a value and read the applicable conversions without manually selecting each output type.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.