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

[BUG] fixed wrapping of date #8247

Merged
merged 7 commits into from
Oct 2, 2024

Conversation

sumukhswamy
Copy link
Contributor

Description

image

Issues Resolved

Screenshot

Testing the changes

Changelog

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: sumukhswamy <[email protected]>
Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 8247.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.14%. Comparing base (9a88bf5) to head (08ce7a7).
Report is 44 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8247   +/-   ##
=======================================
  Coverage   64.14%   64.14%           
=======================================
  Files        3743     3743           
  Lines       88843    88844    +1     
  Branches    13855    13856    +1     
=======================================
+ Hits        56987    56989    +2     
+ Misses      31241    31240    -1     
  Partials      615      615           
Flag Coverage Δ
Linux_1 30.06% <0.00%> (-0.01%) ⬇️
Linux_2 58.86% <ø> (ø)
Linux_3 40.35% <100.00%> (-0.01%) ⬇️
Linux_4 31.58% <ø> (ø)
Windows_1 30.08% <0.00%> (-0.01%) ⬇️
Windows_2 58.81% <ø> (ø)
Windows_3 40.35% <100.00%> (+<0.01%) ⬆️
Windows_4 31.58% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

AMoo-Miki
AMoo-Miki previously approved these changes Sep 19, 2024
@@ -111,7 +111,9 @@ const TableRowUI = ({
<td
key={colName}
data-test-subj="docTableField"
className="osdDocTableCell eui-textBreakAll eui-textBreakWord"
className={`osdDocTableCell ${
colName === '@timestamp' ? 'eui-textNoWrap' : 'eui-textBreakAll eui-textBreakWord'
Copy link
Collaborator

Choose a reason for hiding this comment

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

does the column name is fixed as @timestamp, i think we can select different filed as time field for index pattern
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont quite understand this

Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont quite understand this

As you hardcode the column name as @timestamp, do we have other column name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have updated the condition for it add this for only timefield columns

@@ -111,7 +111,11 @@ const TableRowUI = ({
<td
key={colName}
data-test-subj="docTableField"
className="osdDocTableCell eui-textBreakAll eui-textBreakWord"
className={`osdDocTableCell ${
indexPattern.timeFieldName === colName
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, will there ever be a case where indexPattern.timeFieldName !== colName?

Copy link
Contributor Author

@sumukhswamy sumukhswamy Sep 24, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, will there ever be a case where indexPattern.timeFieldName !== colName?

without diving too deep based on the snippet I'm guessing that this is for all the fields and it was applying the text break all to each colName. For example like if they select timestamp, useriD, statusCode, etc. are all col names. It just timefieldName sticks out because it's the first one we see. Other columns might have a child element that don't let it get wrapped as easily.

To be honest I think this rule could actually be applied to all fields of type date. But that shouldn't block this PR.

Copy link
Member

Choose a reason for hiding this comment

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

created an issue: #8441

@ashwin-pc ashwin-pc merged commit 7d8d840 into opensearch-project:main Oct 2, 2024
74 of 75 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 2, 2024
* fixed wrapping of date

Signed-off-by: sumukhswamy <[email protected]>

* addressed comments

Signed-off-by: sumukhswamy <[email protected]>

* addressed comments for all time-fields

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
(cherry picked from commit 7d8d840)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
sejli pushed a commit that referenced this pull request Oct 3, 2024
* fixed wrapping of date



* addressed comments



* addressed comments for all time-fields



---------


(cherry picked from commit 7d8d840)

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Oct 3, 2024
…oject#8440)

* fixed wrapping of date



* addressed comments



* addressed comments for all time-fields



---------


(cherry picked from commit 7d8d840)

Signed-off-by: sumukhswamy <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants