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

Fix overflow for issue tracking feature #406

Merged
merged 4 commits into from
Mar 17, 2020
Merged

Fix overflow for issue tracking feature #406

merged 4 commits into from
Mar 17, 2020

Conversation

csteez
Copy link
Contributor

@csteez csteez commented Mar 16, 2020

Summary of Changes

Very long JIRA titles are overflowing on to the next line. This shrinks the width at which overflow is used for the list of issues so that doesn't happen.

Tests

N/A

Documentation

N/A

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes, including screenshots of any UI changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public python functions and the classes in the PR contain docstrings that explain what it does
  • PR passes all tests documented in the developer guide

@csteez csteez requested review from danwom and ttannis March 16, 2020 00:56
@codecov-io
Copy link

codecov-io commented Mar 16, 2020

Codecov Report

Merging #406 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #406   +/-   ##
=======================================
  Coverage   78.33%   78.33%           
=======================================
  Files         194      194           
  Lines        4819     4819           
  Branches      625      625           
=======================================
  Hits         3775     3775           
  Misses        998      998           
  Partials       46       46           

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 c762a8f...5b8ace4. Read the comment docs.

@@ -21,7 +21,7 @@
margin: 0px 5px 0px 0px;
}
.issue-title-name {
max-width: 390px;
max-width: 353px;
Copy link
Contributor

@ttannis ttannis Mar 16, 2020

Choose a reason for hiding this comment

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

@dwon is there a way of leveraging something that was defined in our layouts to have a better idea of what this could be? If and when layouts get updated I'm wondering if we can avoid having to manually re-evaluate and update the max-widths of elements in the left panel.

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 was wondering something similar - happy to change to something that would be more maintainable.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cstead If there's no other options that Daniel might be savvy to given his familiarity with the layout work, I'm fine with this fix but wanted to check first.

Copy link

@danwom danwom Mar 16, 2020

Choose a reason for hiding this comment

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

Thinking through some alternatives...

  1. max-width: calc(100% - { some constant } px This may not work so well with variable width ticket numbers. You just allocate a set width the ticket numbers, but this could break with some long ticket names. (IE, DATAHELP-1123 vs IT-SUPPORTDESK-1232 at another company)
  2. Use flex basis, shrink, and grow to automatically let the summary grow into the remaining space. You may need to play around with the structure to get the ... text-overflow to work properly. There is a working example in the TableListItem where we truncate table names and descriptions.
  3. Use the same width breakpoints with new constant values -- this is delicate and likely to break.

I'd probably try approach 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@danwom Thanks so much for your help and advice! I couldn't get it to work with truncated on the direct div, but on a parent it worked great.

Copy link
Contributor

Choose a reason for hiding this comment

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

@csteez I tried this out and experienced that the issue key would wrap on small screens too. If so, what seemed to work was wrapping the issue key in a <span> and adding min-width: fit-content; to .table-issue-link

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ttannis how of small a screen did you try it on? i'm not seeing it replicated on my local.

Copy link
Contributor

Choose a reason for hiding this comment

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

My home laptop and shrinking the browser as skinny and Amundsen allows. I had other changes active while testing these styles though, so if you're not seeing that occur no problem, I'll just check if I can reproduce it in staging when this goes out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds like what i did too. i did the span change anyway, and i already had min-width: fit-content; set

@csteez csteez merged commit 593a0ed into master Mar 17, 2020
@ttannis ttannis deleted the text-overflow-jira branch March 18, 2020 00:46
ttannis added a commit that referenced this pull request Mar 18, 2020
* Allow users to create JIRA tickets associated with a table (#389)

* add jira connection

* update location of report data issue

* add some reducers

* add to global state

* fix saga/redux flow for the jira issues view

* use redux to handle reporting a data issue
:

* fix build

* add jira sdk to requirements.txt, run fix lint errors for js

* add comment

* add data quality icon

* move constants into a separate file

* add tests for reducer and api

* add some more tests

* add more tests, do some refactoring

* still working on tests

* fix unit tests that don't quite work

* fix lint errors

* add some python tests

* add more tests for jira client

* remove unused imports

* remove unused import

* fix lint errors

* for some reason i have to add types?

* re-fix tests

* update comments

* address some comments

* respond to comments

* respond to comments

* remove jira project id requirement:

* add base class for issue tracking

* add resource for issue endpoint

* interim commit while refactoring into more generic

* do some refactor, add a generic base client

* refactor name from jira -> issue

* fix spec per changes in the api

* respond to some pr comments, add some error handling if no jira component is enabled

* update per pr comments

* remove utils for trucation, use ellipsis

* add custom exception class, make sure it returns config error on api call

* fix tests, refactor

* fix lint

* hopefully fix build

* css fix

* try removing jira from requirements

* update tests, add total count of remaining results to api call

* add comment, see if this fixes the build

* update tests

* update build steps

* try making the extras a string like in examples

* try to follow example exactly

* try without quotes

* update tests, make method to generate url

* try string again

* try using jira as a string

* remove references to extras and just install the package

* mock urllib

* update tests

* add tests for rending extra issues

* update text on issues view

* fix some lint issues

* respond to pr comments

* update per pr comments

* respond to pr comments

* fix some lint errors

* respond to comments, some lint fixes

* fix more lint

* respond to pr comments

* remove todo

* add definition of api calls in fe

* hide issue integration by default

* fix tests, increase test coverage a bit

* update some text

* update per some product feedback

* update test

* Apply suggestions from code review

Co-Authored-By: Tamika Tannis <[email protected]>

* update per pr comments

Co-authored-by: Tamika Tannis <[email protected]>

* Add documenation for JIRA feature (#395)

* Add documenation for JIRA feature

* update link

* update docs a little bit

* add some more clarification

* remove whitespace

* Search Filtering Support (#384)

* Initial Filter React/Redux Modifications (#357)

* Update configs and SearchFilter UI

* Remove search syntax logic in SearchBar; Add RegEx validatation for SearchBar

* Add filter state and ducks logic

* Update filter UI; Code cleanup

* Some python lint fixes

* Code cleanup

* Update request utils

* Filter UX Improvements (#361)

* SearchFilter UX improvements

* Filter url updates; Modify no search results message

* Support loading filters from pasted url

* InputFilter apply changes on 'enter'

* Simplify reducer logic + lint cleanup

* Some cleanup based on comments

* Fix build

* Mypy fix

* Mypy fix

* Filter UI Improvements: Part 1 (#370)

* Change 'Type' to 'Source'

* Prevent SearchPanel width increase when InputFilter is present

* Re-lower coverage while in development

* Managed input autocomplete (#375)

* Disabled autocomplete for some email input fields
* Removed the hard coded font size for autocomplete

* Improve user search experience (#376)

* Fix a merge issue

* Allow no search term; Persist filters on SearchPage

* Lint fix

* Add a TODO

* Add support for configurable filter section help text (#377)

* Add support for configurable filter section help text

* Support on CheckboxFilterSection as well

* Add default filterCategories for tables

* Add default helpText

* Update search flow (some more) (#383)

* Add a Breadcrumb on HomePage that makes filters discoverable

* Switch to using explicit clearing of search term; Revert to requiring term for SearchBar submit

* Allow for html in InforButton text

* WIP: Comment out some tests

* Fix an edge case

* Cleanup python logic; Add comments; Add tests;

* Fix indentation error; Cleanup python tests;

* Cleanup HomePage, Breadcrumb, InfoButton; Update tests

* Connect SearchBar to router for executing special SearchPage logic

* Cleanup SearchBar; Add tests;

* Cleanup SearchPage; Add tests

* Cleanup SearchFiilter components; Add tests; Increase jest threshold;

* Fix build; Update FilterSection types

* Cleanup config; Add tests; Update jest threshold;

* Add another config test

* Fix SearchFilter; Add filter action types; Code cleanup; Add tests;

* Cleanup search reducer; Update/add tests;

* Cleanup ducks + utils; Add tests;

* Update application config documentation

* Update endpoint to match search library change

* Remove unused lines

* Update input styles

* rename filterconfig 'value' reference to 'categoryId'

* Add new filter logic to support TagInfo case

* Lint fix

* Restructure filter components to leverage mapStateToProps; Update FilterType enums

* Lint fix

* Fix bad merge

* Apply suggestions from code review

Co-authored-by: Daniel <[email protected]>

* Adds some responsiveness to table detail layouts (#391)

* Improve granularity of logging search actions (#396)

* WIP: One approach

* Second approach

* Fix a few errors; Add tests

* Fix test

* Code cleanup

* Change value for when user selects inline result & searchAll is needed

* Update SearchType enum

* Use snake_case for consistency in backend until we have some auto-convert

* Filter Fixes (#399)

* Reset pageIndex to 0 on filter update

* Allow CheckBoxItem to handle checked = undefined

* Create TableHeaderBullets component (#397)

* Create TableHeaderBullets component

* Fix mocks

* Update search_table endpoint (#400)

* Update search_table endpoint

* Update test docstring

* Add reporter for JIRA Issue Creation (#401)

* WIP test commit

* Update reporter object

* Testing user id

* Another test

* Update fix

* Update jira logic. Move default configs

* Add issue link; Add reported by in description

* Update logic to transform filters then call _search_table (#402)

* Update logic to transform filters then call _search_table

* Update tests

* Upgrade redux & react-redux (#373)

* Update search results to include badges and display them (#398)

* update search to include badges

* fix test

* slight change

* remove mapping for badges

* fix lint

* remove badge as a search term since its not in the filters in ui

* update test, remove unneeded import

* Caste input to lowercase like we do for SearchBar (#404)

* Issue 147/multi doc pathways (#381)

* This adds "programmatic descriptions" into the frontend.

Known issues:
- is_editable property not respecected

Added NonEditable Section

Now no longer need to sort in index page.
Uses the display title for title now.
Added currently untested code in the api for programmatic display

programmatic descriptions no longer needs to be returned by metadata service for backwards compatibility
Tests added for the programmatic display component

Caught a bug where display_title was not being set if configuration wasn't set.
change source_id to source
Make code more robust
Rebasing with the upstream changes that have been made.
adding documentation
removing the comment in the config.py class

Fixing upstream merge conflicts.

Update docs/flask_config.md

Co-Authored-By: jornh <[email protected]>

Removing non editable section!

readOnly is now an optional Property
Added in a programmatic header and <hr> per design doc

adding test for button rendering

Adding in convertText function
Changing SENTENCE_CASE -> Upper Upper. Need to confirm that this is ok, otherwise can create a new case

Reverting SentenceCase
Creating PascalCase
Removing custom title

Moving convert text to EditableSection. Applying by default

* removing pascal case

* fixing doc

* Update amundsen_application/api/utils/metadata_utils.py

Co-Authored-By: Tamika Tannis <[email protected]>

* Update amundsen_application/api/utils/metadata_utils.py

Co-Authored-By: Tamika Tannis <[email protected]>

* cleaning up

* Fixing unit test to have static method

* changing to edit-button

* Moving tests to test_metadata_utils

* Fixing lint

* updating the sample image

Co-authored-by: Tamika Tannis <[email protected]>

* Clean up some tests; Create constant for hardcoded text (#407)

* Fix overflow for issue tracking feature (#406)

* Fix overflow for issues from issue tracking feature

* try using flex properties

* use truncated class

* add span

Co-authored-by: christina stead <[email protected]>
Co-authored-by: Daniel <[email protected]>
Co-authored-by: samshuster <[email protected]>
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.

4 participants