Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Select by class instead of (multiple) id #1370

Merged

Conversation

rzr
Copy link
Contributor

@rzr rzr commented Sep 24, 2018

In case of multiple property of same types,
UI events were forwarded to 1st instance of widget.

This change is a follow up of the switch change:

Bug: #1148
Relate-to: #1249
Change-Id: I2018092168af14eb8f6f1e9e230e04a432490045
Signed-off-by: Philippe Coval p.coval@samsung.com

Copy link
Contributor

@mrstegeman mrstegeman left a comment

Choose a reason for hiding this comment

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

Don't you need to add ${BaseComponent.count} to the templates as well?

@codecov-io
Copy link

codecov-io commented Sep 24, 2018

Codecov Report

Merging #1370 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1370      +/-   ##
==========================================
+ Coverage   74.69%   74.79%   +0.09%     
==========================================
  Files         127      127              
  Lines        6118     6118              
  Branches      854      854              
==========================================
+ Hits         4570     4576       +6     
+ Misses       1368     1363       -5     
+ Partials      180      179       -1
Impacted Files Coverage Δ
src/test/browser/page-object/thing-detail-page.js 96.07% <100%> (ø) ⬆️
src/models/things.js 98.71% <0%> (+1.28%) ⬆️
src/models/thing.js 68.62% <0%> (+1.3%) ⬆️
src/db.js 77.12% <0%> (+1.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec294ef...0c3ea5f. Read the comment docs.

@rzr
Copy link
Contributor Author

rzr commented Sep 24, 2018

Not really this was only needed for CSS rule for switch (for id).

I could use the counter for the slider test, but I guess it thought just add confusion ( count ~= 6 ) and just use the hardcoded one ("slider").

But I can also share an other next change that introduce the counter just for unification of style of templates.

@mrstegeman
Copy link
Contributor

@rzr It would make sense to me to be consistent. Can you push that change up to this PR?

In case of multiple property of same types,
UI events were forwarded to 1st instance of widget.

This change is a follow up of the switch change:

Origin: WebThingsIO#1370
Bug: WebThingsIO#1148
Relate-to: WebThingsIO#1249
Change-Id: I2018092168af14eb8f6f1e9e230e04a432490045
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr rzr force-pushed the sandbox/rzr/review/fix/master branch from 5a9ceda to 4121248 Compare September 24, 2018 19:58
rzr pushed a commit to TizenTeam/gateway that referenced this pull request Sep 24, 2018
This change has no real effect,
only for making code more uniform,

Note that slider id has been renamed to slider-level
to remove ambiguity with slider,
and counter suffix adjusted.

Forwarded: WebThingsIO#1370
Change-Id: I64fe6a78a8ae9d300bab58561a7b0eec7bfb09db
Signed-off-by: Philippe Coval <philippe.coval.pro@gmail.com>
@rzr rzr force-pushed the sandbox/rzr/review/fix/master branch from 4121248 to df24dae Compare September 24, 2018 20:07
rzr added a commit to TizenTeam/gateway that referenced this pull request Sep 24, 2018
This change has no real effect,
only for making code more uniform,

Note that slider id has been renamed to slider-level
to remove ambiguity with slider,
and counter suffix adjusted.

Forwarded: WebThingsIO#1370
Change-Id: I64fe6a78a8ae9d300bab58561a7b0eec7bfb09db
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@@ -128,6 +128,7 @@ class LevelPropertySection extends InputPropertySection {

async getValue() {
const slider = await this.slider();
console.log(slider);
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove log.

This change has no real effect,
only for making code more uniform,

Note that slider id has been renamed to slider-level
to remove ambiguity with slider,
and counter suffix adjusted.

Forwarded: WebThingsIO#1370
Change-Id: I64fe6a78a8ae9d300bab58561a7b0eec7bfb09db
Signed-off-by: Philippe Coval <p.coval@samsung.com>
@rzr rzr force-pushed the sandbox/rzr/review/fix/master branch from df24dae to 0c3ea5f Compare September 25, 2018 07:46
@mrstegeman mrstegeman merged commit 0d0fc3c into WebThingsIO:master Sep 25, 2018
@ghost ghost removed the review label Sep 25, 2018
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.

3 participants