seekr icon indicating copy to clipboard operation
seekr copied to clipboard

fix dropdown bug in guide

Open cn1t opened this issue 2 years ago • 15 comments
trafficstars

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [ ] Project infrastructure change (like issue templates, etc.)

How Has This Been Tested?

Please check all browsers you have tested on. Please also list any relevant details for your test configuration

  • [ ] Chromium Based Browser
  • [ ] Mozilla Firefox

Test Configuration:

  • [ ] Windows
  • [ ] Linux
  • [ ] MacOS
  • [ ] BSD

Checklist:

  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules
  • [ ] I am a web developer

cn1t avatar Aug 16 '23 13:08 cn1t

my sanity is draining

cn1t avatar Aug 16 '23 15:08 cn1t

divine interventions are hindering querySelector from working properly

cn1t avatar Aug 18 '23 14:08 cn1t

A in dropdown value change listener is still missing but that's not that hard to add

9glenda avatar Aug 20 '23 03:08 9glenda

image why do you use an innerhtml here @9glenda

cn1t avatar Aug 20 '23 18:08 cn1t

image why do you use an innerhtml here @9glenda

@Niteletsplay You mean test1? It's the ID/name of the dropdown.

9glenda avatar Aug 21 '23 13:08 9glenda

image why do you use an innerhtml here @9glenda

@Niteletsplay You mean test1? It's the ID/name of the dropdown.

Cant you just use an attribute like title="test1"?

cn1t avatar Aug 21 '23 14:08 cn1t

image why do you use an innerhtml here @9glenda

@Niteletsplay You mean test1? It's the ID/name of the dropdown.

Cant you just use an attribute like title="test1"?

I'll change it to do so. Everything you put as HTML will be ignored anyway.

9glenda avatar Aug 21 '23 14:08 9glenda

@Niteletsplay you can now simply add an event listener called change.

const d = getDropdown("test1")

d!.addEventListener("change", function() {
  console.log(getValue("test1"));
});

9glenda avatar Aug 21 '23 17:08 9glenda

@Niteletsplay should change also be executed on selecting the item already selected and therefore not change of the value?

9glenda avatar Aug 21 '23 17:08 9glenda

@Niteletsplay should change also be executed on selecting the item already selected and therefore not change of the value?

No, but there shouldnt be a problem if it is

cn1t avatar Aug 21 '23 18:08 cn1t

@Niteletsplay now it only has to be implemented in guide

9glenda avatar Aug 22 '23 09:08 9glenda

Do we use this implementation in the edit view too?

cn1t avatar Aug 22 '23 11:08 cn1t

Dropdowns in edit need to be changed to the new implementation then everything is done

9glenda avatar Aug 24 '23 10:08 9glenda

@Niteletsplay don't close this pr

9glenda avatar Aug 25 '23 18:08 9glenda

@Niteletsplay don't close this pr

9glenda avatar Aug 25 '23 20:08 9glenda