Adding attributes to be used by sharing#10234
Conversation
|
@ppisljar I removed the |
|
@ppisljar I'm fine with changing |
|
i'll let you and @thomasneirynck decide |
|
Can you either update existing selenium tests or create new ones that verify these attributes in some way? These effectively become part of our plugin API, so we should have tests to prevent regressions. |
|
@epixa good call, I will do so. |
There was a problem hiding this comment.
I wonder if we could use consts somehow, so that way if they are ever changed in kibana, it won't break reporting. But I guess you can't create attributes dynamically, like
<visualize {{Consts.SharedItemTag}} />
Similar to your worry when I fixed the issue with hiding the reporting link on the dashboard landing page. It's going to be hard for someone to realize that these attributes are used in reporting and changing them will break it. Especially if they are here to help a timing issue, knowing when to load the page, tests might not even fail right away.
I wonder if we could use a const if we did something similar to how we use data-test-subj. Though that only works if no one changes the data-test-subj tag itself.
I just could see someone being like, why is this here and what does it do, and it's not very discoverable.
There was a problem hiding this comment.
At one point, these were calling reporting-item to be very explicit towards their use; however, we switched the name to be more general because they're technically not just for reporting.
I would recommend this, since |
|
@Bargs great catch on the conflict with the HTML |
|
Also an html standard ;) |
thomasneirynck
left a comment
There was a problem hiding this comment.
agree, I'd change it to data-*, since that how data-attributes are recommended to be used (per @Bargs)
Other than that, LGTM
a0580ec to
e917778
Compare
Adding shared-item title tests Switching up the panel tests Adding description tests Fixing linting Adding dashboard timefilter test Adding visualization shared-item tests Adding shared-timefilter tests Adding discover shared-item tests
844ef24 to
063a49e
Compare
Backports PR #10234 **Commit 1:** Adding attributes to be used by sharing * Original sha: cbb5047 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-01-25T15:53:10Z **Commit 2:** Moving the shared-item tags for dashboard panels * Original sha: ba4b74b * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:27:36Z **Commit 3:** Switching from shared-item-title/description to just title/description * Original sha: 757d7cf * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:31:09Z **Commit 4:** Removing move noise * Original sha: c54df9f * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:33:19Z **Commit 5:** Fixing typo * Original sha: 7a13bc9 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:34:18Z **Commit 6:** Adding data- prefix before attributes, began writing tests Adding shared-item title tests Switching up the panel tests Adding description tests Fixing linting Adding dashboard timefilter test Adding visualization shared-item tests Adding shared-timefilter tests Adding discover shared-item tests * Original sha: 0dbb7eb * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-09T19:39:13Z **Commit 7:** Fixing shared-items-count on dashboard * Original sha: 7ab7a70 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-16T14:25:58Z **Commit 8:** Fixing functional test data for discover and visualize * Original sha: 063a49e * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-16T20:57:22Z
Backports PR #10234 **Commit 1:** Adding attributes to be used by sharing * Original sha: cbb5047 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-01-25T15:53:10Z **Commit 2:** Moving the shared-item tags for dashboard panels * Original sha: ba4b74b * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:27:36Z **Commit 3:** Switching from shared-item-title/description to just title/description * Original sha: 757d7cf * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:31:09Z **Commit 4:** Removing move noise * Original sha: c54df9f * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:33:19Z **Commit 5:** Fixing typo * Original sha: 7a13bc9 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-07T20:34:18Z **Commit 6:** Adding data- prefix before attributes, began writing tests Adding shared-item title tests Switching up the panel tests Adding description tests Fixing linting Adding dashboard timefilter test Adding visualization shared-item tests Adding shared-timefilter tests Adding discover shared-item tests * Original sha: 0dbb7eb * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-09T19:39:13Z **Commit 7:** Fixing shared-items-count on dashboard * Original sha: 7ab7a70 * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-16T14:25:58Z **Commit 8:** Fixing functional test data for discover and visualize * Original sha: 063a49e * Authored by kobelb <brandon.kobel@elastic.co> on 2017-02-16T20:57:22Z
Items that will be shared are specifically labeled now, and they provide a title/description via an attribute.