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

feat: Added button to export to pdf (#2730) #6420

Closed
wants to merge 20 commits into from

Conversation

atannus
Copy link
Contributor

@atannus atannus commented Apr 19, 2022

  • Implements component for an "Export do PDF" button.
  • Adds PDF button to SummarySheet.
  • Hides buttons on PDF using "hide-print".

- Implements component for an "Export do PDF" button.
- Adds PDF button to SummarySheet.
- Hides buttons on PDF using "hide-print".
@Dschoordsch
Copy link
Contributor

@BartoszJarocki could you please review this?

@BartoszJarocki BartoszJarocki linked an issue Apr 25, 2022 that may be closed by this pull request
Comment on lines 11 to 29
const tdStyle = {
color: PALETTE.SLATE_700,
fontSize: '13px',
paddingTop: 32,
}

const labelStyle = {
paddingLeft: 8
}
const imageStyle = {
verticalAlign: 'middle'
}

const linkStyle = {
height: '40px',
padding: '12px 10px 0px 10px',
cursor: 'pointer',
width: 'fit-content',
}
Copy link
Contributor

Choose a reason for hiding this comment

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

-1 when working with inline styles, please use the proper type, for example, const linkStyle: React.CSSProperties

width: 'fit-content',
}

class ExportToPDF extends Component<Props> {
Copy link
Contributor

Choose a reason for hiding this comment

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

-1 could you please convert this to the function component? also, there's no need for this to have any props

}
}

export default withAtmosphere(withMutationProps(ExportToPDF))
Copy link
Contributor

Choose a reason for hiding this comment

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

-1 no need to use these hoc's

@BartoszJarocki BartoszJarocki mentioned this pull request Apr 25, 2022
blimmer and others added 19 commits April 26, 2022 16:40
* render list of gitlab issues

* use usePaginationFragment

* increase default value for usePaginationFragment

* implement GitLabScopingSearchResultItem

* add GitLabScopingSelectAllIssues

* can add and remove gitlab issues in scope phase

* add UpdatePokerScopeMutation gitlab optimistic updater

* able to select all issues

* clean up type errors

* add projects name alias to rootSchema

* include projectIds in search query

* return iid from GitLabIssueId

* sort projects by lastActivityAt

* implement fetchGitLabProjects

* implement gitlab issue menu

* implement NewGitLabIssueMenuRoot instead of using useAllIntegrations

* load next if projects dont have any issues

* update comment

* remove gitlab menu root and use defaultProjects query to populate menu

* increase projectsFirst from 10 to 20

* query all gitlab projects

* chore(comment): how to extend BaseTaskIntegration

* able to create a new gitlab issue

* use GitLabServerManager and implement parseWebPath

* fix undefined baseUri

* changed taskIntegrationGitLab and GitLabId to use providerId

* lowercase gitlabRequest to be consistent with gh

* add handle create gitlab issue

* add info fragment and return data instead of data.issue

* add serverBaseUrl

* adjusted root schema and can now render projects in input menu again

* clean up update poker scope and create task gitlab

* fix ts errors

* add gitlab query types

* add fullPath to gitLab issue edge if exists

* get nodes appearing on insert

* get gitlab issue title in create task updater

* include webUrl in createTask query so user can click on newly create issue url

* add first and sort to allProjects query

* rename GitLabRepo to GitLabProject

* pass meetingId to issue input rather than querying it

* remove __typename and resolveTypes

* update UpdatePokerScopeMutation to fix selectAll bug

* clean-up return statement in fetchGitLabProjects

* merge with master

* use react-swipeable-views workaround

* add _xGitLabProject resolver

* merge with master

* map over tabs instead of contents

* fix(gitlab): add proper client-side alias handling (ParabolInc#6361)

* resolve to aliased fields

* resolve to aliased fields

* make poker input menu a dropdown and fix width

* refactor baseTabs to include Component

* create a single source of truth for gitlab issue args

* remove refetchable from gitlab scoping results query

Co-authored-by: Matt Krick <matt.krick@gmail.com>
* feat(standups): Options menu w/ end meeting button

* Actually end the meeting

* Disable button when meeting is ended

* CR: Move+update TODO

* CR: AvatarGroupBlock -> IconGroupBlock

* CR: Remove unnecessary 'async'

* CR: Pull options menu into separate component
* render list of gitlab issues

* use usePaginationFragment

* increase default value for usePaginationFragment

* implement GitLabScopingSearchResultItem

* add GitLabScopingSelectAllIssues

* can add and remove gitlab issues in scope phase

* add UpdatePokerScopeMutation gitlab optimistic updater

* able to select all issues

* clean up type errors

* add projects name alias to rootSchema

* include projectIds in search query

* return iid from GitLabIssueId

* sort projects by lastActivityAt

* implement fetchGitLabProjects

* implement gitlab issue menu

* implement NewGitLabIssueMenuRoot instead of using useAllIntegrations

* load next if projects dont have any issues

* update comment

* remove gitlab menu root and use defaultProjects query to populate menu

* increase projectsFirst from 10 to 20

* query all gitlab projects

* chore(comment): how to extend BaseTaskIntegration

* able to create a new gitlab issue

* use GitLabServerManager and implement parseWebPath

* fix undefined baseUri

* changed taskIntegrationGitLab and GitLabId to use providerId

* lowercase gitlabRequest to be consistent with gh

* add handle create gitlab issue

* add info fragment and return data instead of data.issue

* add serverBaseUrl

* adjusted root schema and can now render projects in input menu again

* clean up update poker scope and create task gitlab

* fix ts errors

* add gitlab query types

* add fullPath to gitLab issue edge if exists

* get nodes appearing on insert

* get gitlab issue title in create task updater

* include webUrl in createTask query so user can click on newly create issue url

* add first and sort to allProjects query

* rename GitLabRepo to GitLabProject

* pass meetingId to issue input rather than querying it

* add gitlab search query

* filter by gitlab search query

* refactor to hooks

* remove __typename and resolveTypes

* update UpdatePokerScopeMutation to fix selectAll bug

* add search icon

* remove searchQuery from scoping results query

* clean-up return statement in fetchGitLabProjects

* add search to issue args

* include search string when adding new gitlab issue

* refactor search query to a gql object

* merge with master

* use react-swipeable-views workaround

* add _xGitLabProject resolver

* merge with master

* remove resolverTypes and gitlabTypes

* map over tabs instead of contents

* fix(gitlab): add proper client-side alias handling (ParabolInc#6361)

* resolve to aliased fields

* resolve to aliased fields

* make poker input menu a dropdown and fix width

* refactor baseTabs to include Component

* create a single source of truth for gitlab issue args

* remove refetchable from gitlab scoping results query

* feat(sprint-poker): Filter GitLab issues by project (ParabolInc#6323)

* query projects from project filter menu

* render projects in filter menu

* use fullPath in gitlab menu and adjust max width

* refactor gitlab search query from string to object with projectIds

* selecting a project in the filter menu adds the item to selectedProjectsFullPath

* selecting a project filters the results

* add search icon

* remove alias

* make selectedProjectIds nullable

* remove useLoadNextOnScrollBottom and increase default projects first

* fix selectedProjects type err

* add search string to differentiate project menu query and include ids in project connection so we can add issues with a filter

* remove gitlab types

* add viewerMeetingMember check and remove selectedProjectsIds resolver

* make selectedProjectsIds null if empty array

Co-authored-by: Matt Krick <matt.krick@gmail.com>

Co-authored-by: Matt Krick <matt.krick@gmail.com>
* render list of gitlab issues

* use usePaginationFragment

* increase default value for usePaginationFragment

* implement GitLabScopingSearchResultItem

* add GitLabScopingSelectAllIssues

* can add and remove gitlab issues in scope phase

* add UpdatePokerScopeMutation gitlab optimistic updater

* able to select all issues

* clean up type errors

* add projects name alias to rootSchema

* include projectIds in search query

* return iid from GitLabIssueId

* sort projects by lastActivityAt

* implement fetchGitLabProjects

* implement gitlab issue menu

* implement NewGitLabIssueMenuRoot instead of using useAllIntegrations

* load next if projects dont have any issues

* update comment

* remove gitlab menu root and use defaultProjects query to populate menu

* increase projectsFirst from 10 to 20

* query all gitlab projects

* chore(comment): how to extend BaseTaskIntegration

* able to create a new gitlab issue

* use GitLabServerManager and implement parseWebPath

* fix undefined baseUri

* changed taskIntegrationGitLab and GitLabId to use providerId

* lowercase gitlabRequest to be consistent with gh

* add handle create gitlab issue

* add info fragment and return data instead of data.issue

* add serverBaseUrl

* adjusted root schema and can now render projects in input menu again

* clean up update poker scope and create task gitlab

* fix ts errors

* add gitlab query types

* add fullPath to gitLab issue edge if exists

* get nodes appearing on insert

* get gitlab issue title in create task updater

* include webUrl in createTask query so user can click on newly create issue url

* add first and sort to allProjects query

* rename GitLabRepo to GitLabProject

* pass meetingId to issue input rather than querying it

* add gitlab search query

* filter by gitlab search query

* refactor to hooks

* query projects from project filter menu

* remove __typename and resolveTypes

* update UpdatePokerScopeMutation to fix selectAll bug

* render projects in filter menu

* use fullPath in gitlab menu and adjust max width

* refactor gitlab search query from string to object with projectIds

* selecting a project in the filter menu adds the item to selectedProjectsFullPath

* selecting a project filters the results

* add search icon

* add search icon

* remove searchQuery from scoping results query

* clean-up return statement in fetchGitLabProjects

* remove alias

* make selectedProjectIds nullable

* add search to issue args

* include search string when adding new gitlab issue

* refactor search query to a gql object

* remove useLoadNextOnScrollBottom and increase default projects first

* merge with master

* fix selectedProjects type err

* add search string to differentiate project menu query and include ids in project connection so we can add issues with a filter

* use react-swipeable-views workaround

* add _xGitLabProject resolver

* merge with master

* remove resolverTypes and gitlabTypes

* map over tabs instead of contents

* implement new scope search ui in gitlab

* refactor gitlabSearchQuery from selectedProjectsIds to selectedProjects

* selected projects showing up in current filters

* truncate current filters

* add new scope search to jira

* show jira project names

* improve current filters positioning

* remove gitlab types

* implement new scope search ui in parabol integration

* implement new scope search bar ui in github

* change filter var to status

* query projects from GitLabIntegration and remove fullPath from gitlab search query

* refactor scoping results query to usePagination and add alias to new issue query so it is not affected by parent query filtering

* fix(gitlab): add proper client-side alias handling (ParabolInc#6361)

* resolve to aliased fields

* resolve to aliased fields

* make poker input menu a dropdown and fix width

* refactor baseTabs to include Component

* create a single source of truth for gitlab issue args

* add viewerMeetingMember check and remove selectedProjectsIds resolver

* remove refetchable from gitlab scoping results query

* make selectedProjectsIds null if empty array

* use optional chaining rather than destructuring many vars

* feat(sprint-poker): GitLab issue is visible in Estimate phase (ParabolInc#6355)

* refactor PokerEstimateHeaderCard to make PokerEstimateHeaderCardContent reusable

* adding commit to play by the gh title rules

* use nullish coalescing instead of logical or

* spread headerFields into PokerEstimateHeaderCardContent

* use join method in currentFilters

Co-authored-by: Matt Krick <matt.krick@gmail.com>
* render list of gitlab issues

* use usePaginationFragment

* increase default value for usePaginationFragment

* implement GitLabScopingSearchResultItem

* add GitLabScopingSelectAllIssues

* can add and remove gitlab issues in scope phase

* add UpdatePokerScopeMutation gitlab optimistic updater

* able to select all issues

* clean up type errors

* add projects name alias to rootSchema

* include projectIds in search query

* return iid from GitLabIssueId

* sort projects by lastActivityAt

* implement fetchGitLabProjects

* implement gitlab issue menu

* implement NewGitLabIssueMenuRoot instead of using useAllIntegrations

* load next if projects dont have any issues

* update comment

* remove gitlab menu root and use defaultProjects query to populate menu

* increase projectsFirst from 10 to 20

* query all gitlab projects

* chore(comment): how to extend BaseTaskIntegration

* able to create a new gitlab issue

* use GitLabServerManager and implement parseWebPath

* fix undefined baseUri

* changed taskIntegrationGitLab and GitLabId to use providerId

* lowercase gitlabRequest to be consistent with gh

* add handle create gitlab issue

* add info fragment and return data instead of data.issue

* add serverBaseUrl

* adjusted root schema and can now render projects in input menu again

* clean up update poker scope and create task gitlab

* fix ts errors

* add gitlab query types

* add fullPath to gitLab issue edge if exists

* get nodes appearing on insert

* get gitlab issue title in create task updater

* include webUrl in createTask query so user can click on newly create issue url

* add first and sort to allProjects query

* rename GitLabRepo to GitLabProject

* pass meetingId to issue input rather than querying it

* add gitlab search query

* filter by gitlab search query

* refactor to hooks

* query projects from project filter menu

* remove __typename and resolveTypes

* update UpdatePokerScopeMutation to fix selectAll bug

* render projects in filter menu

* use fullPath in gitlab menu and adjust max width

* refactor gitlab search query from string to object with projectIds

* selecting a project in the filter menu adds the item to selectedProjectsFullPath

* selecting a project filters the results

* add search icon

* add search icon

* remove searchQuery from scoping results query

* clean-up return statement in fetchGitLabProjects

* remove alias

* make selectedProjectIds nullable

* add search to issue args

* include search string when adding new gitlab issue

* refactor search query to a gql object

* remove useLoadNextOnScrollBottom and increase default projects first

* merge with master

* fix selectedProjects type err

* add search string to differentiate project menu query and include ids in project connection so we can add issues with a filter

* use react-swipeable-views workaround

* add _xGitLabProject resolver

* merge with master

* remove resolverTypes and gitlabTypes

* map over tabs instead of contents

* implement new scope search ui in gitlab

* refactor gitlabSearchQuery from selectedProjectsIds to selectedProjects

* selected projects showing up in current filters

* truncate current filters

* add new scope search to jira

* show jira project names

* improve current filters positioning

* remove gitlab types

* implement new scope search ui in parabol integration

* implement new scope search bar ui in github

* change filter var to status

* query projects from GitLabIntegration and remove fullPath from gitlab search query

* refactor scoping results query to usePagination and add alias to new issue query so it is not affected by parent query filtering

* refactor PokerEstimateHeaderCard to make PokerEstimateHeaderCardContent reusable

* adding commit to play by the gh title rules

* track start of search

* track end of search

* track updated poker scope

* fix(gitlab): add proper client-side alias handling (ParabolInc#6361)

* resolve to aliased fields

* resolve to aliased fields

* make poker input menu a dropdown and fix width

* refactor baseTabs to include Component

* create a single source of truth for gitlab issue args

* add viewerMeetingMember check and remove selectedProjectsIds resolver

* track selected gitlab project filter

* track selected all issues

* track cleared gitlab search

* remove refetchable from gitlab scoping results query

* fix ts error

* keep focus in search input after clearing query

* change searchQueryFilters event track options from string to id

* use nullish coalescing instead of logical or

* make selectedProjectsIds null if empty array

* update SegmentEventTrackOptions

* use optional chaining rather than destructuring many vars

* feat(sprint-poker): GitLab issue is visible in Estimate phase (ParabolInc#6355)

* refactor PokerEstimateHeaderCard to make PokerEstimateHeaderCardContent reusable

* adding commit to play by the gh title rules

* use nullish coalescing instead of logical or

* spread headerFields into PokerEstimateHeaderCardContent

* update event titles and include service

* capitalise search in event tracking

Co-authored-by: Matt Krick <matt.krick@gmail.com>
* feat(CI): only build once

* run tests on prod build

* fix sendPublic

* feat(CI): persist test queries

* Fix test environment setup

* Shutdown rethink and global setup/teardown

* move up waiting on Task table

* clean up rethinkdb afterAll

* maybe wait needs a .run()

* fix typo. done for the week

* dont trust API, just loop until ready

* separate migration from starting server

* set SERVER_ID in pm2 config

* Move jest afterAll into global setup file

Defining `afterAll` in jest setupAfterEnv defines it for all tests.

Co-authored-by: Georg Bremer <github@dschoordsch.de>
* delete unused js in client/utils

* remove types/graphql, lint without globs

* remove stories, include tsconfig.eslint dirs

* refactor lintfilled withRouter components

* delete unused, fix lint

* fix final lint warnings

* fix lint on IntegrationProviderServiceEnum
* parallelize most stuff into pm2

* pm2 all the dev things

* add comments to new scripts

* add npm scripts

* add postcheckout hook

* remove todo comment

* better support for initial dev

* reduce console chatter

* fix server reload client error

* use prod build in CI

* migrate db first

* run postcheckout silently in background
* Update illustration of empty discussion threads

* Removes tangled arrow from empty discussion threads

* Removes unnecessary const value
* fix: not add another responses stage if stage already exist for a given team member

* feat: added responses phase to phaseTypeToSlug lookup

* feat: added team member to team prompt response stage gql type

* feat: team prompt grid

* feat: added static team prompt question

* code cleanup

* add getPhaeByTypename

Co-authored-by: Matt Krick <matt.krick@gmail.com>
* docs: add list of maintainers

* docs: add making changes section

* docs: update steps to keep clean git history
* revert viewerMeetingMember change

* add second commit to pass the pr rules

* disable eslint next line

* use conditionals instead of returning null in ScopePhaseArea
Bumps [nconf](https://github.com/flatiron/nconf) from 0.11.3 to 0.11.4.
- [Release notes](https://github.com/flatiron/nconf/releases)
- [Changelog](https://github.com/indexzero/nconf/blob/master/CHANGELOG.md)
- [Commits](indexzero/nconf@v0.11.3...v0.11.4)

---
updated-dependencies:
- dependency-name: nconf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: ignore comparison order for equality

* fix: areEqual comparison

* fix: typescript checks
- Added type to inline styles.
- Converted to function component and removed props.
- Removed hocs.
@Dschoordsch
Copy link
Contributor

@atannus are you still working on this? Did you want another review round? If so make sure to press the refresh button next to the reviewer who requested changes, otherwise they probably miss it.

@atannus
Copy link
Contributor Author

atannus commented May 18, 2022

@Dschoordsch I spoke with @ackernaut a few days ago, I believe the whole PDF endeavor is stalled pending a priorities review by the team.

@ackernaut
Copy link
Member

Yeah, we don’t want to provide a confusing experience around what’s basically 1) open the print dialog and 2) save as a PDF instead of sending to a printer. We’re not sure we want to recreate this view as a PDF and have 2 views to maintain: 1) the table-based summary 2) a PDF view of it

@BartoszJarocki
Copy link
Contributor

@atannus do you mind if I close this PR as it's pretty outdated? once we're back at this issue we can revisit it.

@atannus
Copy link
Contributor Author

atannus commented Jun 6, 2022 via email

@BartoszJarocki
Copy link
Contributor

will do, thank you!

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.

Export to PDF