-
Notifications
You must be signed in to change notification settings - Fork 0
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: freeze first column - iOS #87
Conversation
a72888a
to
6ad6063
Compare
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
// swiftlint:disable:next force_cast | ||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! DataCellView | ||
cell.isDataView = self.isDataView | ||
cell.backgroundColor = isDataView ? indexPath.row % 2 == 0 ? .white : UIColor(red: 0.97, green: 0.97, blue: 0.97, alpha: 1.0) : .white | ||
cell.cellColor = cellColor | ||
cell.numberOfLines = cellStyle.rowHeight ?? 1 | ||
if let data = dataRows, let columnWidths = columnWidths { | ||
if let data = dataRows, let columnWidths = columnWidths, let dataColumns = dataColumns { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let columnWidths = columnWidths, let dataColumns = dataColumns
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, common practice in Swift.
super.init(frame: frame, withRows: rows, andColumns: cols, theme: theme, selectionsEngine: selectionsEngine, cellStyle: cellStyle, columnWidths: columnWidths) | ||
fitToFrame() | ||
super.init(frame: frame, | ||
withRows: rows, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spacing seems off here. We should setup a linter before we push the alpha branch to master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a lintel... I'll run it
# [1.1.0-alpha.24](v1.1.0-alpha.23...v1.1.0-alpha.24) (2022-10-05) ### Features * freeze first column - iOS ([#87](#87)) ([81203c0](81203c0))
🎉 This PR is included in version 1.1.0-alpha.24 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* feat: freeze first column ios * fix: add total resize * fix: out of bounds Co-authored-by: Vittorio Cellucci <[email protected]>
# [1.1.0-alpha.24](v1.1.0-alpha.23...v1.1.0-alpha.24) (2022-10-05) ### Features * freeze first column - iOS ([#87](#87)) ([81203c0](81203c0))
# [1.1.0](v1.0.11...v1.1.0) (2023-02-10) ### Bug Fixes * (iOS) add text wrapping only if not number ([a2ee707](a2ee707)) * add icons ([4f795d5](4f795d5)) * add initial total rows ([82cd504](82cd504)) * add last grabber to scrollView ([67e2506](67e2506)) * add more horizontal padding ([47c3975](47c3975)) * add numberOflines ([d77beeb](d77beeb)) * add onlayout to rowcountview ([#131](#131)) ([185fa8e](185fa8e)) * alpha android ([#137](#137)) ([351fbfe](351fbfe)) * android resize totals ([#116](#116)) ([7bc4240](7bc4240)) * atom type should be object ([#129](#129)) ([3fe5227](3fe5227)) * autochart crash ([#127](#127)) ([dfe208a](dfe208a)) * avoid dived by zero and display zero rows total ([#185](#185)) ([d9ed113](d9ed113)) * background color image views ([#162](#162)) ([f104ae5](f104ae5)) * background color when indicator set ([#150](#150)) ([f8f2809](f8f2809)) * background for non text cells and minichart potential crash fix ([#161](#161)) ([9805a03](9805a03)) * broken select ([#154](#154)) ([944b6f3](944b6f3)) * call .setNeedsDisplay when view is recycled ([5591a96](5591a96)) * cast error and better touch handling ([#153](#153)) ([5ff32b1](5ff32b1)) * cell background color on expand row ([eae6ec5](eae6ec5)) * center charts ([e21c22b](e21c22b)) * check for both totals.show and position ([3c8f6a3](3c8f6a3)) * check for empty lable ([897dd67](897dd67)) * check for empty row size ([82c0484](82c0484)) * check for isData ([630d34d](630d34d)) * check for isDataView ([601a2d3](601a2d3)) * check for isSelectable in Android ([ff128d2](ff128d2)) * check for position ([12b6b94](12b6b94)) * cleanup shadows ([0aa9250](0aa9250)) * col resize ([#176](#176)) ([6dcce41](6dcce41)) * color index ([7e109ac](7e109ac)) * column resize behaviour to match ios ([#142](#142)) ([d34c26d](d34c26d)) * commit ([#172](#172)) ([bd04558](bd04558)) * count 1/4 visible views ([569c8d7](569c8d7)) * css colors for green and orange ([58fd32c](58fd32c)) * display image label urls ([44309c0](44309c0)) * enable links in viewData ([248da16](248da16)) * enable two finger scrolling ([7657be5](7657be5)) * escape link label ([#149](#149)) ([c6ab3ba](c6ab3ba)) * expand ([#148](#148)) ([7264f58](7264f58)) * fallback to qFallbackTitle ([9f27d25](9f27d25)) * follow order ([15864a2](15864a2)) * fontsizes ([#133](#133)) ([75a36b4](75a36b4)) * get effective properties ([46900c1](46900c1)) * handle links for ios ([71f7c4e](71f7c4e)) * handle null isDim ([eb90ded](eb90ded)) * hide dragbox on touch up ([#139](#139)) ([eda6ae2](eda6ae2)) * horizontal scrollbar ([#113](#113)) ([de27b6b](de27b6b)) * image cells ([#125](#125)) ([c7acc3e](c7acc3e)) * initial visible rows ([fe352e7](fe352e7)) * invalid row counts ([#184](#184)) ([73a5c52](73a5c52)) * ios - increase dragbox hit size ([b48f4c0](b48f4c0)) * iOS bugs ([#112](#112)) ([ce0ef62](ce0ef62)) * ios check for image label ([44c8cfa](44c8cfa)) * ios copy paste ([#135](#135)) ([a8195f3](a8195f3)) * ios last column resizing ([3fd7800](3fd7800)) * ios memory leak ([4e59b2f](4e59b2f)) * ios resize ([#114](#114)) ([6f853a1](6f853a1)) * links android ([#132](#132)) ([2449bb1](2449bb1)) * master dimensions ([60c816d](60c816d)) * master items ([560bccb](560bccb)) * **MD-3721:** respect font sizing ([#118](#118)) ([48df3bf](48df3bf)) * **md-3779:** column sort indicators android ([#122](#122)) ([79ed846](79ed846)) * **MD-3815:** select images ([3e581c7](3e581c7)) * **md-3816:** links not working cause reordered columns android ([#134](#134)) ([e89a90b](e89a90b)) * **md-3822:** image sizing & column ordering ([#136](#136)) ([cfb0920](cfb0920)) * **md-3832:** edit table crash android ([#145](#145)) ([4613a1f](4613a1f)) * **md-3839:** scrollbars and crash ([#155](#155)) ([b8d0e87](b8d0e87)) * **md-3843:** fix expand row android ([#138](#138)) ([3417796](3417796)) * **md-3857:** android minichart expose ([#147](#147)) ([15960d1](15960d1)) * **md-3858:** cell gap and image position/scaling ([#143](#143)) ([c73dc39](c73dc39)) * **MD-3890:** increase line height some more ([#166](#166)) ([9478a58](9478a58)) * **md-3895:** address comments ([#168](#168)) ([f0d5914](f0d5914)) * **md-3896:** expand row text color ([#158](#158)) ([b5ba7fc](b5ba7fc)) * **md-3897:** align scrollbars android ([#165](#165)) ([86346a4](86346a4)) * **md-3919/3918/3920:** totals fixes ([#175](#175)) ([def4dd8](def4dd8)) * **md-3924:** image sizing ([#180](#180)) ([c4a09c3](c4a09c3)) * missing row & update mock scroll on totals update ([#169](#169)) ([7279816](7279816)) * move last resizer to front ([f5774ab](f5774ab)) * notify total cells on repaint ([d715608](d715608)) * null checks ([#152](#152)) ([b86cdf5](b86cdf5)) * null represenation type ([#115](#115)) ([f3d0cd9](f3d0cd9)) * null totals position ([#117](#117)) ([bad1287](bad1287)) * padding on charts ([4f3aa53](4f3aa53)) * passdown cardinal of dimension ([4376b78](4376b78)) * push display title down ([2810a5e](2810a5e)) * **QB-17176:** check for null link ([#146](#146)) ([d5b4e3e](d5b4e3e)) * **QB-17856:** check for empty rows ([#182](#182)) ([26a0c59](26a0c59)) * remove jank ([793e12a](793e12a)) * remove totals from view data & misc small fixes ([#124](#124)) ([88947e7](88947e7)) * remove two finger scrolling ([295539b](295539b)) * resize ([b2936b7](b2936b7)) * resize column grabbers ([c626ef0](c626ef0)) * resize on rotation ([f79c86e](f79c86e)) * resize on stretch ([5b31618](5b31618)) * resizing selection band ([#126](#126)) ([614e284](614e284)) * reszing images ([#123](#123)) ([93be6e1](93be6e1)) * revert syntax ([632bcbf](632bcbf)) * rollback to average width ([8556a66](8556a66)) * search in column ([66884f5](66884f5)) * selection ([0771cab](0771cab)) * selection band ([#128](#128)) ([636c0b7](636c0b7)) * set label only if defined ([93d76a7](93d76a7)) * simplify android layout ([#101](#101)) ([c53f0e4](c53f0e4)) * styling & dragbox ([#121](#121)) ([c675cb4](c675cb4)) * text align ([7dd2e2f](7dd2e2f)) * text only view data ([#157](#157)) ([8ffed04](8ffed04)) * threaded loader and search alignment ([#164](#164)) ([29f9bbc](29f9bbc)) * totals cell wrapping ([#173](#173)) ([bdd27d2](bdd27d2)) * totals colors ([#159](#159)) ([b35591e](b35591e)) * totals line count for ios ([c57d0bf](c57d0bf)) * totals missing ([#130](#130)) ([1293568](1293568)) * totals on converted charts ([5cbaebf](5cbaebf)) * update header text ([683456d](683456d)) * update README.md ([1c1ca74](1c1ca74)) * use rawColIdx ([#160](#160)) ([1214b24](1214b24)) * use same cell padding ([#156](#156)) ([3ce0604](3ce0604)) * wrapping ([#140](#140)) ([a9223cf](a9223cf)) * Wrapping in header and view data height ([#174](#174)) ([fa361bc](fa361bc)) ### Features * add mini-charts for ios ([7f7ee13](7f7ee13)) * android styling and conditionals ([#103](#103)) ([327d091](327d091)) * barchart ([#99](#99)) ([ac7ab23](ac7ab23)) * conditional coloring ioS ([0892713](0892713)) * copy image charts android ([#109](#109)) ([af81780](af81780)) * freeze first column - iOS ([#87](#87)) ([81203c0](81203c0)) * icons for ios ([101878f](101878f)) * **MD-3347:** add drage select for ios ([#90](#90)) ([33eb89e](33eb89e)) * **MD-3347:** copy cell in table (ios) ([#94](#94)) ([a071134](a071134)) * **md-3348:** freeze first column android ([#96](#96)) ([52b69ef](52b69ef)) * **md-3350:** column totals android ([#106](#106)) ([de75078](de75078)) * **md-3351:** row count android ([#105](#105)) ([8b347a3](8b347a3)) * **md-3356:** native table images ([#88](#88)) ([a5eef90](a5eef90)) * **MD-3360:** colors ([9fb117e](9fb117e)) * **MD-3363:** total rows cound ios ([fa0bbbd](fa0bbbd)) * **md-3365:** copy cell android ([#97](#97)) ([a195f88](a195f88)) * **md-3608:** remove alternating colors ([#81](#81)) ([c64f09a](c64f09a)) * **md-3746:** search expand android ([#110](#110)) ([39810b7](39810b7)) * **md-3747:** translations android ([#107](#107)) ([3278ade](3278ade)) * support images in table ios ([91b9180](91b9180))
This is for MD-3366
Note: you will get a warning when reszing the first column on frozen one. The issue is that the size of the frame is updated prior to the getting the size of the cell. And things go out of synch. But this is a benign warning.