how to fix tableview scrolling?

Before i integrated flexible bar, my table scrolled at correct position for cell via:
[self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];

[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];

first reload - refresh cell and change the height of row, but scrolling after that is not working anymore.
here is video:
https://www.dropbox.com/s/bp937vhsm3izvru/bug scroll.mov?dl=0
correct position - when editor is fit totally to screen. How to fix it? i don't wanna to remove your bar, because i already integrated and liked abit :)

Hey @plandem, I'm not exactly sure what the issue is. After you change the height of one of your cells and refresh the table view, scrolling doesn't work afterward? Looking at your video, it looks like you scroll after the cell's height grows. It's tough for me to see what the issue is based on the video.
Can you clarify a bit more about what is happening after the cell height changes?

here is some snippets.
height:
-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
	indexPath = [tableView dataSourceIndexPathFromVisibleIndexPath: indexPath];
	return ([indexPath compare:self.selectedIndexPath] != NSOrderedSame) ? cellHeightList : cellHeightListEditor;
}

select:
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
	indexPath = [tableView dataSourceIndexPathFromVisibleIndexPath: indexPath];
	[self onSelectRow:indexPath];
}

real selection:
/**
* Select row
*/
-(void)onSelectRow:(NSIndexPath *)indexPath {
	BOOL isSame = ([indexPath compare:self.selectedIndexPath] == NSOrderedSame);

	@weakify(self);
	[CATransaction begin];
	[CATransaction setCompletionBlock: ^{
		@strongify(self);
		[CATransaction begin];
		[CATransaction setCompletionBlock: ^{
			@strongify(self);
			if (!(isSame)) {
				self.selectedIndexPath = indexPath;
				[self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
				[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
			}
		}];

		[self.tagView collapsePanel];
		[CATransaction commit];
	}];

	[self discardSelection];
	[CATransaction commit];
}

so here is steps:

on select i retain selected row
i reload this row
during reload i return new height for that row
i scroll at that row (row already has new height)

Without your bar, scrolling worked as needed. but now it's not scrolled enough. and im not sure how to fix it.

Thanks for providing more info. I figured out the problem, and as far as I can tell, it has nothing to do with BLKFlexibleHeightBar. The problem happens when you set the contentInset of your table view - something that you probably want to do when using BLKFlexibleHeightBar.
Here's a demo project that I made to test my hypothesis. I set the contentInset in viewDidLoad:.
https://www.dropbox.com/s/xctbj94fpdhn05s/TableViewTests.zip?dl=0
I don't have time to find a solution, but I think that manually setting the contentOffset of your table view is the way to go. The table view's contentInset.top property should be a part of this calculation. If you find a workaround using that idea or maybe a better one, let me know =)

but in other cases(i mean scrolling) contentInset is not a problem? do u dynamically recalc it?

well, i still puzzled. i just tried to log "contentOffset" and it's same after 'scrollToIndexPath'!!!
-(void)onSelectRow:(NSIndexPath *)indexPath {
	BOOL isSame = ([indexPath compare:self.selectedIndexPath] == NSOrderedSame);

	@weakify(self);
	[CATransaction begin];
	[CATransaction setCompletionBlock: ^{
		@strongify(self);
		[CATransaction begin];
		[CATransaction setCompletionBlock: ^{
			@strongify(self);
			if (!(isSame)) {
				self.selectedIndexPath = indexPath;
				[self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];

				[CATransaction begin];
				[CATransaction setCompletionBlock: ^{
					@strongify(self);
//					[self.tableView setContentOffset:newOffset animated:YES];
					NSLog(@"===== after %@", NSStringFromCGPoint(self.tableView.contentOffset));
				}];
				NSLog(@"===== before %@", NSStringFromCGPoint(self.tableView.contentOffset));
				[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
				[CATransaction commit];
			}
		}];

		[self.tagView collapsePanel];
		[CATransaction commit];
	}];

	[self discardSelection];
	[CATransaction commit];
}

looks like scrollToRowAtIndexPath does not touch the contentOffset

and im still sure it's your bar specific task (again). Because in other case i would not use contentInset, and would use tableViewController that already has autoAdjustContentInset. My idea - if you make user to do something (like add contentInset), then its your component specific after that. Because without this 'something' your component will not work correctly.

well, i gave up finally. i tried alot, and still no success. The most problems at top of scrollview - when i try to expand row and bar is visible same time. Here is my last try:
-(void)onSelectRow:(NSIndexPath *)indexPath {
	BOOL isSame = ([indexPath compare:self.selectedIndexPath] == NSOrderedSame);

	@weakify(self);
	[CATransaction begin];
	{
		[CATransaction setCompletionBlock:^{
			NSLog(@"1 . discard phase done");
			@strongify(self);
			[CATransaction begin];
			{
				[CATransaction setCompletionBlock:^{
					NSLog(@"2 . tagView phase done");
					@strongify(self);
					if (!(isSame)) {
						[CATransaction begin];
						{
							[CATransaction setCompletionBlock:^{
								NSLog(@"3 . reload phase done");
								@strongify(self);
								[CATransaction begin];
								{
									[CATransaction setCompletionBlock:^{
										NSLog(@"4 . scroll phase done");
										@strongify(self);
										CGRect rowRect = [self.tableView rectForRowAtIndexPath:indexPath];
										CGPoint offsetContent = self.tableView.contentOffset;
										NSLog(@"===== after scroll");
										NSLog(@"table. minY=%f, maxY=%f, height=%f, offset=%f", CGRectGetMinY(self.tableView.bounds), CGRectGetMaxY(self.tableView.bounds), CGRectGetHeight(self.tableView.frame), offsetContent.y);
										NSLog(@"row. minY=%f, maxY=%f, height=%f", CGRectGetMinY(rowRect), CGRectGetMaxY(rowRect), CGRectGetHeight(rowRect));

										CGFloat spaceLeft = CGRectGetMaxY(self.tableView.bounds) - CGRectGetMaxY(rowRect);
										CGFloat progress = fabsf(spaceLeft) / self.headerView.maximumBarHeight;
										NSLog(@"select progress = %f/%f", progress, spaceLeft);
										if(spaceLeft < 0) {
											NSLog(@"change progress to %f", MIN(progress, 1.0f));
//											self.tableView.contentInset = UIEdgeInsetsMake(CGRectGetMaxY(self.flexibleHeightBar.frame), scrollView.contentInset.left, scrollView.contentInset.bottom, scrollView.contentInset.right);
//											[self.tableView setContentOffset:(CGPoint){offsetContent.x, -(self.headerView.maximumBarHeight - fabsf(spaceLeft))} animated:YES];
											[self.headerView.behaviorDefiner snapToProgress:MIN(progress, 1.0f) scrollView:self.tableView];
										}
									}];

									CGSize sizeHeader = self.headerView.frame.size;
									CGRect rowRect = [self.tableView rectForRowAtIndexPath:indexPath];
									CGPoint offsetContent = self.tableView.contentOffset;
									UIEdgeInsets insetContent = self.tableView.contentInset;

									NSLog(@"===== before scroll");
									NSLog(@"table. minY=%f, maxY=%f, height=%f, offset=%f", CGRectGetMinY(self.tableView.bounds), CGRectGetMaxY(self.tableView.bounds), CGRectGetHeight(self.tableView.frame), offsetContent.y);
									NSLog(@"row. minY=%f, maxY=%f, height=%f", CGRectGetMinY(rowRect), CGRectGetMaxY(rowRect), CGRectGetHeight(rowRect));

									[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
								} [CATransaction commit];
							}];

							self.selectedIndexPath = indexPath;
							CGRect rowRect = [self.tableView rectForRowAtIndexPath:indexPath];
							CGSize sizeHeader = self.headerView.frame.size;
							CGPoint offsetContent = self.tableView.contentOffset;
							UIEdgeInsets insetContent = self.tableView.contentInset;

							NSLog(@"===== before reload");
							NSLog(@"table. minY=%f, maxY=%f, height=%f, offset=%f", CGRectGetMinY(self.tableView.bounds), CGRectGetMaxY(self.tableView.bounds), CGRectGetHeight(self.tableView.frame), offsetContent.y);
							NSLog(@"row. minY=%f, maxY=%f, height=%f", CGRectGetMinY(rowRect), CGRectGetMaxY(rowRect), CGRectGetHeight(rowRect));

							[self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
						} [CATransaction commit];
					}
				}];

				[self.tagView collapsePanel];
			} [CATransaction commit];
		}];

		[self discardSelection];
	} [CATransaction commit];
}

and my point is still same - it's bad idea to make people to reimplement TableView behaviors (like scrollToIndexPath) just to make your component work properly. So i will stay with common header now. I already spent more than enough time for it.

@plandem, this appears to be the intended behavior of UIScrollView. Play around with the demo I posted. If you set the contentInset property of the UITableView to 200.0 and then do
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForItem:10 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:YES];

Then item 10 will not be aligned to the top edge of the scroll view, but rather, the top inset. This seems to be the right behavior.
If you are proposing that I compensate for this built in, completely unrelated behavior of UIScrollView, then I'm afraid we fundamentally disagree about what the responsibilities of this project are.
I'll reopen this if you show me that this has something to do with my project specifically. For now, my research proves otherwise, so I think this issue should be closed.

man, i understand you position about that's it's not component specific. but let's consider this:

proposed that your component works fine with (UITableView, UICollectionView) - and here i don't even mention anything about UITableViewController.

we have UITableView(yes, it's scrollView inside, but does not matter here), for example. with built-in header and want to use your component to add some neat effects to his table's header. Again, proposed that your component works fine with UITableView.

we started to integrated you component and here is result:
a) we have to move table's header to outside of table(in some cases it's not suitable, but nevermind)
b) we have to set contentInset to make header looks like table's header
c) if we have some advanced logic for table - sorting, expanding/collapsing rows (or any dynamic height for row that we can change runtime), then we will have troubles with you component, because we have to re-implement already built-in features that works correctly with table's header and footers, with any dynamic height and etc.
d) you insist that it's not your component specific issue and i'm totally disagree with it. Because, truth is that your component is not working with UITableView/UICollectionView properly. Yes, at some cases it can work correctly, but it actually does not support it. That's my point. And i see only 2 ways to solve this disappointment: a) fix and make component to support UITableView/UICollectionView, respect specific features (like table's header) or b) fix the documentation and warn the potential users that this component partially supported UITableView/UICollectionView.

Because i disagree, that case when after integration something, i have to re-implement or replace built-in features - not component's specific issue. Know why? Because right now i moved back at table's header way and i have:
a) properly working scrolling - built-in feature
b) properly working expanding/collapsing - built in feature
c) i just don't have neat effects of your component - external feature.

to summ:
UITableView/UICollectionView are not UIScrollView. It's subclass of it with own features and workarounds about these features. If insist that, user must consider UITableView/UICollectionView as UIScrollView and forget about this features and own workarounds to get same functionalities, that i have nothing to say. That's my point.

BLKFlexibleHeightBar makes no attempt to adjust the scroll view content inset. Whatever value it's set to when you first configure the bar is what it will always be. This is the root of the issue you're experiencing.
Maybe the BLKFlexibleHeightBarBehaviorDefiner should adjust this? I'll look into it more when I get the chance. Although this is totally expected behavior of UIScrollView and all subclasses, the fact that BLKFlexibleHeightBar changes its height might indicate that it should also play some role in adjusting content insets.
I'll reopen so that others can see our conversation and maybe contribute a solution. I'll also look into a solution and try to find something appropriate once I get the chance.

Well, to support UITableView you must not consider table like isolated UIScrollView with only rows, because that's not true. That's UIScrollView that has: a) header, b) some rows c) footer. If i want to add some neat features to UITableView's header, then i must respect it and know about it. You advise move out header of UITableView, i.e. make it holds only rows. Sometimes it can work. I would advise to reconsider it and solve 2 cases:

UIViewController with some UIView (header) and UIScrollView below
UIViewController with only UIScrollView with some UIView(header) inside of it.

We want to apply neat features to UIView(header) and make UIScrollView play with own offset/inset with respecting 'hierarchy' of that UIView to make these features alive.

I am not sure what the entire issue is since the conversation is huge, but can't you just scroll doing:

(void)scrollRectToVisible:(CGRect)

and pass the rect you want to be visible? That way you don't have to deal with contentInset etc.

nope, if you will see commented code - i tried both: scrollRectToVisible and setOffset too. scrollToIndexRow works correctly, when rest 'scrolls' way - nope.

The issue is that the content inset doesn't change. This is related to another issue (on mobile so I can't link it). I'll definitely fix this but I'm pretty busy this week. There's a pull request open for a partial fix. Causes some issues with the square cash behavior defined though.

Hi All,
I have same issue when i'm using FlexibleHeader ios material design,
when tableview contentInset changed and you need to programmatically scrollto a section the first row of that section will scroll to the contentInset top value. i tried almost everything with no success so if anyone has a solution for this please let me know


translate: support stdout redirections

Otherwise:
$  echo 'echo > /dev/null' | babelfish

errors out.

Closes https://github.com/bouk/babelfish/issues/6.

Thank you!

Thank you!


Zip not save if I delete a file after make

Hello, I have this snippet of code:
Zipper::make('public/tmp/zip/test.zip')->add($files);
 File::delete(base_path('folder/resources/app/settings.json'));

Why it doesn't save zip if I delete a file thats in folder after make?

you need to call 'close()' to close the zip and write all changes.
Zipper::make('public/tmp/zip/test.zip')->add($files)->close();
 File::delete(base_path('folder/resources/app/settings.json'));

Thank you so much! and thank you for utility!


ENH: handled comparison between nodes where name is None

Summary by Sourcery
Enhance TreeNode comparison methods to handle cases where the name attribute is None by treating it as an empty string, and add corresponding test cases to ensure correct behavior.
Enhancements:

Handle comparison between TreeNode objects where the name attribute is None by treating None as an empty string.

Tests:

Add test cases to verify TreeNode comparison behavior when the name attribute is None.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

6 of 6 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.004%) to 91.935%

Totals

Change from base Build<PHONE_NUMBER>3:
0.004%

Covered Lines:
32373

Relevant Lines:
35213

💛  - Coveralls


added images

There was an error while validating job 7b6b9d7b-ba02-4c1b-97bd-3defc9b094a6 Message:Error clonning repositoryDetails:System.ArgumentException: Error clonning repository ---> LibGit2Sharp.NotFoundException: Branch 522 not found. Available branches: origin/master
at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.GetBranch(Repository repo, String name)
at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.<>c__DisplayClass34.<>c__DisplayClass39.b__2e(KeyValuePair2 branch)    at System.Collections.Generic.List1.ForEach(Action1 action)    at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.<>c__DisplayClass34.<CloneRepository>b__2c()    at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()    at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func)
at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction(Action action)
at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.CloneRepository(String url, IDictionary2 branches)    --- End of inner exception stack trace ---    at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.CloneRepository(String url, IDictionary2 branches)
at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.CloneRepository()
at Microsoft.DPS.Services.LibGit2SharpSourceControlProvider.GetTreeAsync(String path, Boolean includeSubDirectories, String excludePath, IList1 extensionWhiteList)    at Microsoft.DPS.Commands.IdentifyDocumentsToPublish.ListSourceControlFilesCommand.Do(IDictionary2 context)
at Microsoft.LightweightJobEngine.Core.Language.JobWorkflow1.RunCommands(Guid jobId, IDictionary2 context, CancellationTokenSource cancelSignal)


CI statistics fixes

Fixes issues with PRs failing due to not having stats access permissions

Yes, should fix both. As a side note, forked PR builds still pull the source (this) repo, so will contribute to the stats. Maybe we don't mind this too much?


Improve the Cell morphology

The morphology query runs very slowly. This is probably a result of the OPTIONALs in the query.

Closing this as it is "overcome by events". The morphology query is dependent on an approach for storage of cell morphology that is unlikely to be pursued going forward. #304 attempts to address the problem of redesigning the method for accessing morphology.


Pint does not honor exclude and notPath rules in pint.json when passed a list of files

Pint Version: 1.1.1
PHP Version: 8.1.9

Description:
I have a pre-commit hook that grabs the list of files to be committed from git and passes them to Pint as a list of command line arguments. However, doing this causes Pint to "fix" the files even if some of them are on the exclude lists in pint.json  (which often breaks them, hence why they were excluded in the first place).
I'm not sure what the intended behaviour was...it could be that the intended behaviour was to override the exclude lists when explicitly passing Pint a file or list of files. However, I could also see some benefit in respecting the exclude lists when passing files to Pint. To clarify the behaviour (and allow for both options), perhaps a -f argument could be added to Pint which would force Pint to fix a file even if it's on the exclude lists?
Steps To Reproduce:

Add either a path or file to the exclude or notPath fields in pint.json, respectively.
Pass a file (or list of files) to Pint (pint <file_1> <file_2> ...) which would normally be excluded when running pint by itself.

This is the intended behavior. Passing files explicitly will cause them to be formatted.


App missing

There is no "Microsoft Azure Consumption Insights" app listed.  Just "Microsoft Azure Enterprise".  Was the consumption insights app discontinued too, or moved somewhere else that is not reflected in the documentation?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d2d95443-afbf-fadd-6932-1edef039548f
Version Independent ID: b5a9d263-4b72-e566-a53f-5c5e0bebafae
Content: Connect to Microsoft Azure Consumption Insights with Power BI - Power BI
Content Source: powerbi-docs/service-connect-to-azure-consumption-insights.md
Service: powerbi
GitHub Login: @SarinaJoan
Microsoft Alias: sarinas

Thank you for your feedback. I have assigned this issue to the author. She will determine if it's a doc omission or a change in feature.

@kfile.  Not mine.  I believe Maggie handles this one.

Hi, @jordanmills -- I see it in the list of apps in Power BI now. Do you see it? It might not have been showing up during the transition period from "Microsoft Azure Enterprise" to "Microsoft Azure Consumption Insights".
Thanks!

It did finally show up.  I tried installing it, but it's blank.  And I don't mean that fields and graphs are empty or zero, I mean that all it shows is a grey background.

Hi, @jordanmills -- sorry to hear it! This sounds more like a support request than documentation feedback. You might find a solution in the Power BI Community, found at https://community.powerbi.com. If not, you can get support by going to https://support.powerbi.com. I hope that helps!


Feature Request: upgrade path-to-regexp

Newer versions of path-to-regexp has features of which I am envious, e.g. support for negative lookahead regular expressions. React Router is currently pinned to a very old version. If an upgrade presents a breaking change then 6.0 would be a good time to consider doing it.

Duplicate of #6899